From owner-freebsd-ports@FreeBSD.ORG Tue Oct 2 10:33:14 2012 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4F2E0106566B for ; Tue, 2 Oct 2012 10:33:14 +0000 (UTC) (envelope-from jamie@kode5.net) Received: from kontrol.kode5.net (kontrol.kode5.net [80.229.5.32]) by mx1.freebsd.org (Postfix) with ESMTP id 8C9128FC14 for ; Tue, 2 Oct 2012 10:33:13 +0000 (UTC) Received: from kontrol.kode5.net (localhost [127.0.0.1]) by kontrol.kode5.net (8.14.5/8.14.5) with ESMTP id q92AXBUO082795 for ; Tue, 2 Oct 2012 11:33:11 +0100 (BST) (envelope-from jamie@kode5.net) Received: (from jamie@localhost) by kontrol.kode5.net (8.14.5/8.14.5/Submit) id q92AXBve082794 for freebsd-ports@freebsd.org; Tue, 2 Oct 2012 11:33:11 +0100 (BST) (envelope-from jamie@kode5.net) X-Authentication-Warning: kontrol.kode5.net: jamie set sender to jamie@kode5.net using -f Date: Tue, 2 Oct 2012 11:33:11 +0100 From: Jamie Paul Griffin To: freebsd-ports@freebsd.org Message-ID: <20121002103310.GA3931@kontrol.kode5.net> Mail-Followup-To: freebsd-ports@freebsd.org References: <201210020808.q9288Y2J023975@mech-cluster241.men.bris.ac.uk> <506AB4C8.6020208@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <506AB4C8.6020208@freebsd.org> x-operating-system: FreeBSD 9.1-PRERELEASE amd64 x-pgp-fingerprint: A4B9 E875 A18C 6E11 F46D B788 BEE6 1251 1D31 DC38 x-pgp-key: 1D31DC38 User-Agent: Mutt/1.5.21 (2010-09-15) X-Virus-Scanned: clamav-milter 0.97.6 at kontrol.kode5.net X-Virus-Status: Clean Subject: Re: removing non-existent ports from /var/db/pkg ? X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Oct 2012 10:33:14 -0000 [ Matthew Seaman wrote on Tue 2.Oct'12 at 10:32:56 +0100 ] > 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. Hi Matthew and Anton, so in the meantime what is the best way to clear this old stuff out? I do like to clear out code and files that are redundant, where possible. What would you suggest? Cheers, Jamie