From owner-freebsd-hackers@FreeBSD.ORG Wed Jul 18 23:11:04 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 0D76716A405; Wed, 18 Jul 2007 23:11:04 +0000 (UTC) (envelope-from rnoland@2hip.net) Received: from gizmo.2hip.net (gizmo.2hip.net [64.74.207.195]) by mx1.freebsd.org (Postfix) with ESMTP id D015013C4E1; Wed, 18 Jul 2007 23:11:03 +0000 (UTC) (envelope-from rnoland@2hip.net) Received: from [63.251.67.21] (rnoland-ibm.acs.internap.com [63.251.67.21]) (authenticated bits=0) by gizmo.2hip.net (8.13.8/8.13.8) with ESMTP id l6IMotW2041387 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO); Wed, 18 Jul 2007 18:50:55 -0400 (EDT) (envelope-from rnoland@2hip.net) From: Robert Noland To: Stephen Montgomery-Smith In-Reply-To: <20070718154452.B3091@math.missouri.edu> References: <20070718154452.B3091@math.missouri.edu> Content-Type: text/plain Date: Wed, 18 Jul 2007 18:50:50 -0400 Message-Id: <1184799050.33981.66.camel@rnoland-ibm.acs.internap.com> Mime-Version: 1.0 X-Mailer: Evolution 2.10.3 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.1.8 X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on gizmo.2hip.net X-Mailman-Approved-At: Wed, 18 Jul 2007 23:43:43 +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: Wed, 18 Jul 2007 23:11:04 -0000 On Wed, 2007-07-18 at 15:56 -0500, 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 Hrm, not quite what I had in mind... I don't want to misrepresent that a port was built against a newer version of a dependency. What I was hoping for would be that a port when reinstalled would not list both the current version of a dependency as well as a previous version of the same origin (which it aquired via the +CONTENTS of some other direct dependency). It should only list the currently installed version of that origin. That way it is still possible to determine that the interim port was built against an older version. I just want the +CONTENTS file to accurately list the versions that a given port was built against. robert. > 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. > > Stephen > > _______________________________________________ > freebsd-ports@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-ports > To unsubscribe, send any mail to "freebsd-ports-unsubscribe@freebsd.org"