From owner-freebsd-ports Mon Apr 29 5:30: 6 2002 Delivered-To: freebsd-ports@freebsd.org Received: from topaz.mdcc.cx (topaz.mdcc.cx [212.204.230.141]) by hub.freebsd.org (Postfix) with ESMTP id 32A2337B405; Mon, 29 Apr 2002 05:29:56 -0700 (PDT) Received: from k7.mavetju.org (topaz.mdcc.cx [212.204.230.141]) by topaz.mdcc.cx (Postfix) with ESMTP id 6469E2B83D; Mon, 29 Apr 2002 14:29:25 +0200 (CEST) Received: by k7.mavetju.org (Postfix, from userid 1001) id A36625A0; Mon, 29 Apr 2002 22:28:43 +1000 (EST) Date: Mon, 29 Apr 2002 22:28:43 +1000 From: Edwin Groothuis To: Peter Pentchev Cc: Maxime Henrion , ports@FreeBSD.org Subject: Re: patch to have make clean not recurse in ${PORTSDIR} Message-ID: <20020429222843.P56612@k7.mavetju.org> References: <20020426204935.GA42922@elvis.mu.org> <3CC9D357.9010105@owt.com> <20020426224107.GB42922@elvis.mu.org> <20020427090419.F56612@k7.mavetju.org> <20020426232017.GC42922@elvis.mu.org> <20020427094000.H56612@k7.mavetju.org> <20020426235247.GD42922@elvis.mu.org> <20020427101938.A77837@k7.mavetju.org> <20020427002814.GE42922@elvis.mu.org> <20020429121211.A342@straylight.oblivion.bg> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20020429121211.A342@straylight.oblivion.bg>; from roam@ringlet.net on Mon, Apr 29, 2002 at 12:12:11PM +0300 Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Mon, Apr 29, 2002 at 12:12:11PM +0300, Peter Pentchev wrote: > On Fri, Apr 26, 2002 at 05:28:14PM -0700, Maxime Henrion wrote: > > Edwin Groothuis wrote: > > > > Uh ? In what way ? The only case that my patch would broke that I am > > > > able to imagine is if there was some port in /usr/ports depending on > > > > another port not itself in this tree but elsewhere, which is *very* > > > > unlikely. > > > > > > It will break if the port itself has a clean-target. Not all of > > > them, actually probably close to "none of them" has it, but they > > > have the capability to have one and that is something which should > > > be reserved. > > > > That's right. I think it's a good thing if my patch breaks something > > which a port shouldn't do anyway, though. :-) > > My feelings exactly. A port's *build* should not affect anything, > repeat, *anything*, outside its work directory. This is even > codified in the Porter's Handbook, section 15.3 (well, okay, so I fully agree with this. > rule as a hard-and-fast one). The 'clean' target cleans up the files > generated during the build and the build only. From these two statements, > it follows that the 'clean' target should not have - ever - to remove > any files outside the port's work directory. It doesn't have to remove the files outside the ports work directory, but your statement of "cleans up files during the build process" is not true, it does a full rm -rf of the work directory. If my pre-fetch statement (for example one like the one from postfix) creates a configuration file in the workdir (unlike postfix, which does it in the port-dir), it shouldn't have to be deleted by the clean-statement. Why does postfix store it in the port-dir? Because a "make clean" doesn't throw it away then. Is this a good thing? No (I've got shot at because I dared to do the same thing :-) How can it be solved? Overrule the clean-target in the postfix Makefile so that it will throw out the srcdir (iirc) and the .*done* files, but that it leaves the configuration file intact. Edwin -- Edwin Groothuis | Personal website: http://www.MavEtJu.org edwin@mavetju.org | Interested in MUDs? Visit Fatal Dimensions: bash$ :(){ :|:&};: | http://www.FatalDimensions.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message