From owner-freebsd-pkg@freebsd.org Wed Feb 10 22:50:37 2016 Return-Path: Delivered-To: freebsd-pkg@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9ED44AA4E36 for ; Wed, 10 Feb 2016 22:50:37 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: from mail-lf0-x22d.google.com (mail-lf0-x22d.google.com [IPv6:2a00:1450:4010:c07::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 14BA01B68 for ; Wed, 10 Feb 2016 22:50:37 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: by mail-lf0-x22d.google.com with SMTP id 78so21353803lfy.3 for ; Wed, 10 Feb 2016 14:50:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=nR8S50bWH8RrLR9G94Y+Q7H4JLuohcpNcURp3UaemSU=; b=Tb5ULmqPpQfjjD5MZimm7kh0tNpngZGIEh5bWy8bCuuzeHdmZm559T+6sQMJ9L6Szc ViizmgRNWB9aiMQe8AmuybwGq0d4Gzci5kQTdVv3p4Lq0agir+f7LdCc5cySUSQ11ldL nqrrz78TQ/1aDuSjSfnCJIJao36WEgDtE2dxp3m+SwvPxUt3Scg9lz38cBmKea4BBEZF AGadNN6OIitB6lKLkYYLVFK6PCe/8Q2KAsbn6b45tqFnutOwO7igAveeowKwOWSfJMbl B3I0asx2JB/E3KW+gzTGnkAC6gENODPOkOh7/3SdkXFjfWqS7ipnqmiKBxDhP7hOF9tG rllg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-type:content-disposition :in-reply-to:user-agent; bh=nR8S50bWH8RrLR9G94Y+Q7H4JLuohcpNcURp3UaemSU=; b=U0FTcazRawb7qJyRCHtZ36huBKVESzPqB1Ov3HOrsjBwMmaECfOnHKPX2DiQIocecr CQ+BkIKrNc561TVCI4BKVReT8sogfzOtyZjyuwWMXvCIobHdUC9k6qx8InEppCFZmGEY bbq9gDJSg4qDQ0QB1dgI9y2hiItQXcFE/B882iasJfgtDfdT56c00ZZMVj9L6bpzMCxb 84kevCo2XzF4pJkPf+Bgl41OSs/GzREzFS01FQu8fj67ulHMV4zlIqjD6oyiI7K/DBcJ oKs0DJXVhOliktJ+MLUdV6IAQm4FMsMcA8fWHcVxuOYzohAlos9FS5v+Cnq/Hbs+tJiD gwSw== X-Gm-Message-State: AG10YORlckrAn9XxXT/CZ5MMrHFR/uyHuxtSpXANbCDfYCa6ha/b56PBd7NTKtgwYfhqaQ== X-Received: by 10.25.142.136 with SMTP id q130mr18362071lfd.56.1455144635235; Wed, 10 Feb 2016 14:50:35 -0800 (PST) Received: from ivaldir.etoilebsd.net ([2001:41d0:8:db4c::1]) by smtp.gmail.com with ESMTPSA id f4sm779359lbs.10.2016.02.10.14.50.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 10 Feb 2016 14:50:34 -0800 (PST) Sender: Baptiste Daroussin Date: Wed, 10 Feb 2016 23:50:32 +0100 From: Baptiste Daroussin To: Tomasz Sowa Cc: freebsd-pkg@freebsd.org Subject: Re: pkg force to add a package Message-ID: <20160210225031.GJ1141@ivaldir.etoilebsd.net> References: <56BB7371.8070400@ttmath.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="ed/6oDxOLijJh8b0" Content-Disposition: inline In-Reply-To: <56BB7371.8070400@ttmath.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-BeenThere: freebsd-pkg@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Binary package management and package tools discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Feb 2016 22:50:37 -0000 --ed/6oDxOLijJh8b0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Feb 10, 2016 at 06:29:21PM +0100, Tomasz Sowa wrote: > Hi >=20 > Some questions about pkg. On one computer I have recompiled my ports, > next I wanted to copy them to another machine so I created packages > (for simplicity I'm showing only one package): > /home/tomek# pkg create -f tar nettle-3.2 > Creating package for nettle-3.2 > It created nettle-3.2.tar package. >=20 > On the other machine I have nettle installed but it was in an old > version: > [second_machine]/home/tomek# pkg info | grep nettle > nettle-2.7.1 Low-level cryptographic library >=20 > Let we see some files from the package: > [second_machine]/home/tomek# pkg info -l nettle-2.7.1 | grep lib | head -= n 4 > /usr/local/lib/libhogweed.a > /usr/local/lib/libhogweed.so > /usr/local/lib/libhogweed.so.2 > /usr/local/lib/libhogweed.so.2.5 >=20 > Make sure those files belong to the nettle package: > [second_machine]/home/tomek# pkg which /usr/local/lib/libhogweed.so.2 /us= r/local/lib/libhogweed.so.2.5 > /usr/local/lib/libhogweed.so.2 was installed by package nettle-2.7.1 > /usr/local/lib/libhogweed.so.2.5 was installed by package nettle-2.7.1 >=20 > Now I move the new nettle-3.2 to this machine and try to > `pkg add` it: > [second_machine]/home/tomek# pkg add nettle-3.2.tar=20 > [second_machine] Installing nettle-3.2... > the most recent version of nettle-2.7.1 is already installed >=20 > It reports me that I have the newest version installed, where the > information (version) is taken from? is it normal behavior? >=20 > So I have forced the installation: > [second_machine]/home/tomek# pkg add -f nettle-3.2.tar > [second_machine] Installing nettle-3.2... > package nettle is already installed, forced install > [second_machine] Extracting nettle-3.2: 100% >=20 > Make sure it is really installed: > [second_machine]/home/tomek# pkg info | grep nettle > nettle-3.2 Low-level cryptographic library >=20 > But what about the old files from nettle 2.7.1? > [second_machine]/home/tomek# ll /usr/local/lib/libhogweed.so.2 /usr/local= /lib/libhogweed.so.2.5 > lrwxr-xr-x 1 root wheel 17 2 lip 2015 /usr/local/lib/libhogweed.= so.2@ -> libhogweed.so.2.5 > -rw-r--r-- 1 root wheel 419229 2 lip 2015 /usr/local/lib/libhogweed.= so.2.5 >=20 > There are still there, may they belongs to some other package now? > [second_machine]/home/tomek# pkg which /usr/local/lib/libhogweed.so.2 /us= r/local/lib/libhogweed.so.2.5 > /usr/local/lib/libhogweed.so.2 was not found in the database > /usr/local/lib/libhogweed.so.2.5 was not found in the database >=20 > No, they are orphans. And next question is: is it correct behavior? > I would expect that either `pkg info | grep nettle` reports both: > nettle-2.7.1 Low-level cryptographic library > nettle-3.2 Low-level cryptographic library > or if only nettle-3.2 is installed those files from 2.7.1 > are uninstalled. Correct me if am wrong pls. >=20 Beside the error message being wrong, the issue is the fact you do use pkg = add (which is not supposed to be used in that case) pkg add is a basic tool supposed to mimic the old pkg_add for the ports tree usage (I don't know how to properly warn users about it) or for special oth= er cases. What you were looking for was pkg install ./nettle-3.2.tar which will repla= ce the old nettle already installed. and of course the error message from pkg add is mis leading and should be f= ixed. Best regards, Bapt --ed/6oDxOLijJh8b0 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJWu763AAoJEGOJi9zxtz5aS+8QANLlDTAFQt35wBKojzzw0b0J mOj7e0pLNro4kedG7mvFfERyBd4lqBvUpv3DCBeq+XRWEXGE+zBRhM6+Aj3RZfFQ T2UnxSRWdbpgRx3zkpOLB97D21UyDv/I1Kc5gaGuTF7Z6/B6aEsMwuld7FVf7KIo tLHUlJX3V11PV5Lxa6zUNPjNh/BP5SwOtIZBoUQKf+Hd1g/iy9V8nu7000Tc/kkz fCqDwEyUGQqmT6njldW/9z7b3a6kp9ogcbv1MZkI5lY5MulZv01wcwlD1HUTO2uN 3muwKEN6SspZ3oGJKeyH0Ioa3F56G/QuEEu1WfzNIMMDDrhGh/eSZuXFWQUqb8Tw wmkO05Vsr5hKownSM1lJ9N6yZz33BYkBG38axgCDuF5Wb8su6Z5x6f9aFACnCU4c 9JVGR1t1i03o631SK6lxOPwZy1TiUt78wrALpQsSMYNfaZ8ffkdiPtUivDYSMzX7 YjCR7bpM/kIrTVydFazFjLroCPrYqFa0RqHEK1Cjuje2lbwxyYb62Ppf0zTsI0R3 nnqtVAl6LUhaely7CePEedbabQKNaViSAv04ezgShs+REYnBl51nxfy3/MCvfiaZ OCfUkGtIaMKH8iahlVXZqLxur7gWpMGbvLZtopO3jx61JMcxI2s6ArYOfCQ3GZen hSV8rVbv0WqSy0AyHZCH =du/G -----END PGP SIGNATURE----- --ed/6oDxOLijJh8b0--