Date: Tue, 02 Oct 2012 10:32:56 +0100 From: Matthew Seaman <matthew@freebsd.org> To: freebsd-ports@freebsd.org Subject: Re: removing non-existent ports from /var/db/pkg ? Message-ID: <506AB4C8.6020208@freebsd.org> In-Reply-To: <201210020808.q9288Y2J023975@mech-cluster241.men.bris.ac.uk> References: <201210020808.q9288Y2J023975@mech-cluster241.men.bris.ac.uk>
next in thread | previous in thread | raw e-mail | index | archive | help
On 02/10/2012 09:08, Anton Shterenlikht wrote: > I have on one system: > > # ls /var/db/pkg > apr-1.4.6.1.4.1_1 help2man-1.40.10 pkgconf-0.8.4 > auditfile help2man-1.40.11 pkgconf-0.8.5 > autoconf-2.69 help2man-1.40.12 pkgconf-0.8.6 > automake-1.12.2 libconfuse-2.7 pkgconf-0.8.7_2 > automake-1.12.3 libxml2-2.7.8_5 pkgconf-0.8.8 > automake-1.12.4 local.sqlite pkgconf-0.8.9 > ganglia-monitor-core-3.1.7_4 mpfr-3.1.1 python27-2.7.3_3 > gcc-4.7.2.20120721 neon29-0.29.6_4 rsync-3.0.9_2 > gcc-4.7.2.20120728 pcre-8.31_1 sqlite3-3.7.14 > gcc-4.7.2.20120804 pkg-1.0 subversion-1.7.5 > gcc-4.7.2.20120825 pkg-1.0.r4 subversion-1.7.6 > gcc-4.7.2.20120908 pkg-1.0.r4_1 sudo-1.8.5.p3 > gcc-4.7.3.20120929 pkg-1.0.r5_1 sudo-1.8.6.p3_1 > gmake-3.82_1 pkg-1.0.r6_1 > # pkg info -xo gcc-4.7 > gcc-4.7.3.20120929: lang/gcc47 > # > > I wonder why I have old versions of several ports, > which no longer exist, e.g. gcc47. > > I update with portmaster. > Does the normal update procedure > remove the old version entry > from /var/db/pkg if the update > has been successful? This is an unfortunate effect of using pkgng to handle packages and portmaster+patches to build them. The old pkg_tools were the owners of that whole /var/db/pkg/ sub-directory structure, and used to take care of deleting old entries once ports were updated or removed. portmaster stores some of its meta-data in those directories but it doesn't itself remove any that are out of date. pkg only uses the data in local.sqlite -- so there's nothing left willing to clean up the mess. This is something that should probably be added to the portmaster patch when used with pkgng. Cheers, Matthew
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?506AB4C8.6020208>