From owner-freebsd-hackers@FreeBSD.ORG Thu Jul 19 01:44:27 2007 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B48DF16A400; Thu, 19 Jul 2007 01:44:27 +0000 (UTC) (envelope-from bsd-unix@earthlink.net) Received: from fall-lakeland.atl.sa.earthlink.net (fall-lakeland.atl.sa.earthlink.net [207.69.195.103]) by mx1.freebsd.org (Postfix) with ESMTP id 7A90013C4BB; Thu, 19 Jul 2007 01:44:27 +0000 (UTC) (envelope-from bsd-unix@earthlink.net) Received: from pop-satin.atl.sa.earthlink.net ([207.69.195.63]) by fall-lakeland.atl.sa.earthlink.net with esmtp (Exim 4.34) id 1IBIK9-0007Ql-UX; Wed, 18 Jul 2007 18:48:49 -0400 Received: from fl-76-1-181-252.dhcp.embarqhsd.net ([76.1.181.252] helo=kt.weeeble.com) by pop-satin.atl.sa.earthlink.net with smtp (Exim 3.36 #1) id 1IBIK7-0005PK-00; Wed, 18 Jul 2007 18:48:48 -0400 Date: Wed, 18 Jul 2007 18:48:46 -0400 From: Randy Pratt To: Stephen Montgomery-Smith Message-Id: <20070718184846.8a08e2f6.bsd-unix@earthlink.net> In-Reply-To: <20070718154452.B3091@math.missouri.edu> References: <20070718154452.B3091@math.missouri.edu> X-Mailer: Sylpheed 2.4.3 (GTK+ 2.10.14; i386-portbld-freebsd6.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Thu, 19 Jul 2007 03:51:27 +0000 Cc: ports@freebsd.org, hackers@freebsd.org Subject: Re: Problems with +CONTENTS being messed up by pkg_delete -f X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2007 01:44:27 -0000 On Wed, 18 Jul 2007 15:56:49 -0500 (CDT) Stephen Montgomery-Smith wrote: > > If you "pkg_delete -f" a package and then install the port again (but > after it has been bumped up a version), then the +CONTENTS of ports that > require the original port will be incorrect. This apparently messes up > programs like portmanager. There is a sense in which one should never do > "pkg_delete -f" and expect /var/db/pkg to keep its integrety - on the > other hand this is exactly what "make deinstall" does. > > My feeling is that the integrety of /var/db/pkg should be maintained > across a "make deinstall" and subsequent "make install" of a bumped > version of the port. > > This is my suggestion. When a "pkg_delete -f" is executed, it looks > through +REQUIRED_BY of the port it is going to delete, and modifies the > +CONTENTS file of each of them, replacing lines like > @pkgdep xineramaproto-1.1.2 > @comment DEPORIGIN:x11/xineramaproto > > to maybe something like > @comment DELDEPORIGIN:x11/xineramaproto > > ("deleted dependency origin"). A subsequent "make install" of > x11/xineramaproto should look through the +CONTENTS of all entries in > /var/db/pkg and change these lines to something like > > @pkgdep xineramaproto-1.1.3 > @comment DEPORIGIN:x11/xineramaproto > > A further benefit of this approach is that one could also accurately > reconstruct the +REQUIRED_BY of the port just reinstalled - right now this > is left empty and thus inaccurate. > > What do you guys think? I know I could write the code for this quite > quickly, but I want some feedback before I work on it. I've not read this thread in detail but I think "pkgdb -L" could be of use in this situation. It will check and restore lost dependencies against the ports tree. It has worked for me on several occasions. As far as package set creation for distribution on my systems, I use the "pkg_create -b" instead of "make package". I have only used "make package" to check a port that is being created for local use (as per Porters Handbook). Just ignore me if I've misunderstood the thread ;-) Randy --