From owner-freebsd-hackers@FreeBSD.ORG Wed Jul 18 14:16:57 2007 Return-Path: X-Original-To: freebsd-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 8F55C16A400; Wed, 18 Jul 2007 14:16:57 +0000 (UTC) (envelope-from stephen@math.missouri.edu) Received: from cauchy.math.missouri.edu (cauchy.math.missouri.edu [128.206.184.213]) by mx1.freebsd.org (Postfix) with ESMTP id 6164613C4B6; Wed, 18 Jul 2007 14:16:57 +0000 (UTC) (envelope-from stephen@math.missouri.edu) Received: from laptop2.gateway.2wire.net (cauchy.math.missouri.edu [128.206.184.213]) by cauchy.math.missouri.edu (8.14.1/8.13.4) with ESMTP id l6IEGuMx094840; Wed, 18 Jul 2007 09:16:56 -0500 (CDT) (envelope-from stephen@math.missouri.edu) Message-ID: <469E20D8.2020408@math.missouri.edu> Date: Wed, 18 Jul 2007 09:16:56 -0500 From: Stephen Montgomery-Smith User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.8.1.4) Gecko/20070717 SeaMonkey/1.1.2 MIME-Version: 1.0 To: Alexander Leidinger References: <469D62D3.70908@math.missouri.edu> <20070718111920.43c198e3@deskjail> In-Reply-To: <20070718111920.43c198e3@deskjail> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: ports@freebsd.org, freebsd-hackers@freebsd.org Subject: Re: Slight problem with make actual-package-depends with ports 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 14:16:57 -0000 Alexander Leidinger wrote: > Quoting Stephen Montgomery-Smith (Tue, 17 Jul 2007 19:46:11 -0500): > >> I appreciate that most people won't have this problem, but it has bitten me. >> >> After you have made and installed a port, but don't clean it, and then >> made a bunch of other ports, if you go back to the original port and >> then do "make package", then +CONTENTS can be a bit messed up for the >> package. This is because the creation of other ports might disturb > > Can you please give an example what "messed up" means in this context, > e.g. post a diff between a good an a bad contents file? And what > actions you did to get this difference? I don't have an example to hand right now. > >> _LIB_RUN_DEPENDS and might put in some extra entries in +CONTENTS. > > You mean that if you create a leaf package and then rebuild a package > which is in the middle of the dependency tree with options which change > the dependency graph of the leaf package you get problems? > > If yes: this has to be expected. You need to rebuild the packages in > the right order. > >> This happens to me because I make all my ports on one machine and then >> copy them as packages to other machines. Then on the other machines, >> the structure of /var/db/pkg gets a bit messed up and pkg_delete -r >> malfunctions. > > I have a lot of jails where I use the packages build in other jails. I > haven't seen a problem there. The package install doesn't change the > +CONTENTS files, so /var/db/pkg should be messed up on the build > machine too... > >> It seems to me that the cure is to slightly change "make >> actual-package-depends" so that if the port is already installed, it >> just uses +CONTENTS. > > This is wrong. What if you have a port installed and you want to > rebuild the same version with other OPTIONS which changes the +CONTENTS > file? If I read your patch right, it will use the wrong contents... You cannot install the port until you have first deinstalled it (unless you use some kind of "FORCE" option, and it is reasonable that this would mess things up). Thus at installation time, +CONTENTS will never exist. But I take your point if perhaps you do need to use some kind of FORCE option.