From owner-freebsd-ports Sat Apr 29 3: 6:37 2000 Delivered-To: freebsd-ports@freebsd.org Received: from smtp6.mindspring.com (smtp6.mindspring.com [207.69.200.110]) by hub.freebsd.org (Postfix) with ESMTP id 19F7037B5B5; Sat, 29 Apr 2000 03:06:32 -0700 (PDT) (envelope-from asami@cs.berkeley.edu) Received: from silvia.hip.berkeley.edu (sji-ca41-197.ix.netcom.com [209.111.208.197]) by smtp6.mindspring.com (8.9.3/8.8.5) with ESMTP id FAA04141; Sat, 29 Apr 2000 05:58:43 -0400 (EDT) Received: (from asami@localhost) by silvia.hip.berkeley.edu (8.9.3/8.6.9) id CAA24979; Sat, 29 Apr 2000 02:56:13 -0700 (PDT) To: Will Andrews Cc: Bhishan Hemrajani , ports@FreeBSD.ORG, Gunnar Flygt , Alex Charalabidis , FreeBSD Questions Subject: Re: /var/db/pkg wiped by Netscape install References: <39069087.4F61F51B@gorean.org> <200004260727.e3Q7RXe62720@cytosine.dhs.org> <20000426081809.B389@argon.blackdawn.com> From: asami@FreeBSD.ORG (Satoshi - Ports Wraith - Asami) Date: 29 Apr 2000 02:55:41 -0700 In-Reply-To: Will Andrews's message of "Wed, 26 Apr 2000 08:18:09 -0400" Message-ID: Lines: 51 X-Mailer: Gnus v5.7/Emacs 20.6 Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org * From: Will Andrews * I was bitten by this too, recently. Ok, looking at bsd.port.mk, it should be these lines that are causing it. === .if defined(FORCE_PKG_REGISTER) @if [ -e ${PKG_DBDIR}/${PKGNAME}/+REQUIRED_BY ]; then \ ${CP} ${PKG_DBDIR}/${PKGNAME}/+REQUIRED_BY /tmp/${PKGNAME}-required-by; \ fi @${RM} -rf ${PKG_DBDIR}/${PKGNAME} .endif === If you have FORCE_PKG_REGISTER set and a port with an empty PKGNAME, this could wipe away the entire /var/db/pkg. However, since the new bsd.port.mk defines PKGNAME without any conditionals, this can't happen with an up to date ports tree. (The worst case, even if you ignore all the ".BEGIN exit 1" type things, would be PKGNAME=- (a single dash), which is not the same as it being empty.) Looking at what's special about netscape47-navigator, there was a period of time when it was missing PORTNAME/PORTVERSION: ---------------------------- revision 1.47 date: 2000/04/14 13:29:03; author: asami; state: Exp; lines: +4 -1 Make sure PORTNAME/PORTVERSION are defined before inclusion of pre.mk. There might be some better solutions but this should at least make them work for now. ---------------------------- revision 1.46 date: 2000/04/10 00:06:08; author: cpiazza; state: Exp; lines: +1 -2 Update with the new PORTNAME/PORTVERSION variables ---------------------------- Between 4/10 and 4/14, you may have ended up with an empty /var/db/pkg if you had FORCE_PKG_REGISTER set. Does that make sense to everybody? If that is the case, I apologize; I should have taken out the REQUIRE_PORTNAME conditional as soon as the conversion started to avoid these kind of problems. I didn't do that, as I did not want to break the entire ports tree, but on retrospect, I should have done just that so that the conversion work would be essentially fix up the tree piecemeal and thus would have made clear which ports are now safe to use. -PW To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message