From owner-freebsd-ports@FreeBSD.ORG Wed Jul 18 21:32:18 2007 Return-Path: X-Original-To: ports@freebsd.org 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 74D7816A401 for ; Wed, 18 Jul 2007 21:32:18 +0000 (UTC) (envelope-from stephen@math.missouri.edu) Received: from math.missouri.edu (math.missouri.edu [128.206.184.200]) by mx1.freebsd.org (Postfix) with ESMTP id 48C3D13C4AC for ; Wed, 18 Jul 2007 21:32:18 +0000 (UTC) (envelope-from stephen@math.missouri.edu) Received: from math.missouri.edu (localhost [127.0.0.1]) by math.missouri.edu (8.13.1/8.13.1) with ESMTP id l6IKunq3051205; Wed, 18 Jul 2007 15:56:49 -0500 (CDT) (envelope-from stephen@math.missouri.edu) Received: from localhost (stephen@localhost) by math.missouri.edu (8.13.1/8.13.1/Submit) with ESMTP id l6IKun53051202; Wed, 18 Jul 2007 15:56:49 -0500 (CDT) (envelope-from stephen@math.missouri.edu) Date: Wed, 18 Jul 2007 15:56:49 -0500 (CDT) From: Stephen Montgomery-Smith To: ports@freebsd.org, hackers@freebsd.org Message-ID: <20070718154452.B3091@math.missouri.edu> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Subject: Problems with +CONTENTS being messed up by pkg_delete -f 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: Wed, 18 Jul 2007 21:32:18 -0000 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. Stephen