From owner-freebsd-questions@FreeBSD.ORG Thu Oct 11 22:29:27 2007 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 601B316A420 for ; Thu, 11 Oct 2007 22:29:27 +0000 (UTC) (envelope-from fbsd.questions@rachie.is-a-geek.net) Received: from snoogles.rachie.is-a-geek.net (rachie.is-a-geek.net [66.230.99.27]) by mx1.freebsd.org (Postfix) with ESMTP id 2330C13C47E for ; Thu, 11 Oct 2007 22:29:27 +0000 (UTC) (envelope-from fbsd.questions@rachie.is-a-geek.net) Received: from localhost (localhost [127.0.0.1]) by snoogles.rachie.is-a-geek.net (Postfix) with ESMTP id 3A2031CDFC for ; Thu, 11 Oct 2007 14:29:26 -0800 (AKDT) From: Mel To: freebsd-questions@freebsd.org Date: Fri, 12 Oct 2007 00:29:17 +0200 User-Agent: KMail/1.9.7 References: <1192134379.33933.9.camel@secretariat.lanl.gov> <20071011211317.GA24658@owl.midgard.homeip.net> <1192138145.33933.21.camel@secretariat.lanl.gov> In-Reply-To: <1192138145.33933.21.camel@secretariat.lanl.gov> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-6" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200710120029.22052.fbsd.questions@rachie.is-a-geek.net> Subject: Re: I performed an rm -r on /var/lib/pkg X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Oct 2007 22:29:27 -0000 On Thursday 11 October 2007 23:29:05 James wrote: > What has happened, though, is I've never ran rm in /usr/ports/distfiles. > I'm going to think for a little bit about a script that can move > through /usr/ports/distfiles and reinstall everything that exists there. Well, if you figure out what ports you have installed, you can regenerate the pkgdb using: make -DNO_BUILD -DNO_INSTALL generate-plist fake-pkg for each port. I just tested that using a temporary PKG_DBDIR. In case you wanna see what happens, here's what I did: mkdir -p /tmp/var/db/pkg cd /usr/ports/shells/bash env PKG_DBDIR=/tmp/var/db/pkg make -DNO_BUILD -DNO_INSTALL \ generate-plist fake-pkg # ls /tmp/var/db/pkg/bash-3.2.25/ +COMMENT +DEINSTALL +INSTALL +CONTENTS +DESC +MTREE_DIRS It's missing +REQUIRED_BY and @pkgdep lines in +CONTENTS, but haven't been able to figure out yet why that is. I hope this gets you a bit closer. -- Mel