From owner-freebsd-pkg@freebsd.org Wed Feb 10 17:30:18 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 08B4FAA49CA for ; Wed, 10 Feb 2016 17:30:18 +0000 (UTC) (envelope-from tomek@ttmath.org) Received: from ttmath.org (ttmath.org [213.241.55.160]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8AE8311F4 for ; Wed, 10 Feb 2016 17:30:17 +0000 (UTC) (envelope-from tomek@ttmath.org) Received: from s100.ttmath.org (user-94-254-240-26.play-internet.pl [94.254.240.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ttmath.org (Postfix) with ESMTPSA id E6E9943E0445 for ; Wed, 10 Feb 2016 18:29:28 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=ttmath.org; s=ttmath; t=1455125369; bh=1VjZkmkxN0IHIB1U/ZQ8I4iQHVfJiUNmOZOlzaYt8z8=; h=To:From:Subject:Date:From; b=f72HrMOjyy8tTllaNKBwUhjvhs/RtclzOhqOpeWUXOyVaWs/Jm3NQSvRDaTS5tl4X GptVvnpysAfQHnGWerNaEPJzhg8/UywLdnnLvYHCj3LOFzf4besqav2A7WDIuHpW1W aqaE0iHe5TNKKQqJmw1OtKKEwkb9hcwPkMYwLD+cgtul6bzJGnRfVfdKOuL/1hPcdQ Vr+iIXi4Gpx2E/rcufInuOpFYbdygAxFb6L6vCbP0T0BFjVW2sUxbHAMLas8ieWaEu 4Yq6dkImFFbREuqDakj4aFJQUUZZ+rypm25UVHTdTKJFyLm0byq/cO5WTpA47269bX Ig9QYkCmmVSCw== To: freebsd-pkg@freebsd.org From: Tomasz Sowa Subject: pkg force to add a package X-Enigmail-Draft-Status: N1110 Message-ID: <56BB7371.8070400@ttmath.org> Date: Wed, 10 Feb 2016 18:29:21 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit 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 17:30:18 -0000 Hi 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. 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 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 Make sure those files belong to the nettle package: [second_machine]/home/tomek# pkg which /usr/local/lib/libhogweed.so.2 /usr/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 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 [second_machine] Installing nettle-3.2... the most recent version of nettle-2.7.1 is already installed It reports me that I have the newest version installed, where the information (version) is taken from? is it normal behavior? 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% Make sure it is really installed: [second_machine]/home/tomek# pkg info | grep nettle nettle-3.2 Low-level cryptographic library 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 There are still there, may they belongs to some other package now? [second_machine]/home/tomek# pkg which /usr/local/lib/libhogweed.so.2 /usr/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 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. -- Tomek