removing non-existent ports from /var/db/pkg ?
matthew at freebsd.org
Tue Oct 2 09:33:19 UTC 2012
On 02/10/2012 09:08, Anton Shterenlikht wrote:
> I have on one system:
> # ls /var/db/pkg
> apr-22.214.171.124.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-126.96.36.19920721 neon29-0.29.6_4 rsync-3.0.9_2
> gcc-188.8.131.5220728 pcre-8.31_1 sqlite3-3.7.14
> gcc-184.108.40.20620804 pkg-1.0 subversion-1.7.5
> gcc-220.127.116.1120825 pkg-1.0.r4 subversion-1.7.6
> gcc-18.104.22.16820908 pkg-1.0.r4_1 sudo-1.8.5.p3
> gcc-22.214.171.12420929 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-126.96.36.19920929: 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.
More information about the freebsd-ports