From owner-freebsd-ports Mon Nov 19 13:10: 8 2001 Delivered-To: freebsd-ports@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 147AC37B417 for ; Mon, 19 Nov 2001 13:10:01 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id fAJLA1u89067; Mon, 19 Nov 2001 13:10:01 -0800 (PST) (envelope-from gnats) Received: from gull.prod.itd.earthlink.net (gull.mail.pas.earthlink.net [207.217.120.84]) by hub.freebsd.org (Postfix) with ESMTP id 4700B37B416 for ; Mon, 19 Nov 2001 13:07:38 -0800 (PST) Received: from dialup-209.245.132.171.dial1.sanjose1.level3.net ([209.245.132.171] helo=blossom.cjclark.org) by gull.prod.itd.earthlink.net with esmtp (Exim 3.33 #1) id 165vdT-0001RD-00 for FreeBSD-gnats-submit@freebsd.org; Mon, 19 Nov 2001 13:07:28 -0800 Received: (from cjc@localhost) by blossom.cjclark.org (8.11.6/8.11.3) id fAJL6Yh00849; Mon, 19 Nov 2001 13:06:34 -0800 (PST) (envelope-from cjc) Message-Id: <200111192106.fAJL6Yh00849@blossom.cjclark.org> Date: Mon, 19 Nov 2001 13:06:34 -0800 (PST) From: "Crist J. Clark" Reply-To: cjclark@alum.mit.edu To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.113 Subject: ports/32114: WRKDIRs should be moved to a central location 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 >Number: 32114 >Category: ports >Synopsis: WRKDIRs should be moved to a central location >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Mon Nov 19 13:10:00 PST 2001 >Closed-Date: >Last-Modified: >Originator: Crist J. Clark >Release: FreeBSD 4.4-STABLE i386 >Organization: >Environment: System: FreeBSD blossom.cjclark.org 4.4-STABLE FreeBSD 4.4-STABLE #0: Wed Nov 7 14:50:28 PST 2001 cjc@blossom.cjclark.org:/usr/obj/export/stable/src/sys/BLOSSOM i386 Ports system as of above date. >Description: Presently, the ports Makefiles will by default put the WRKDIR in ${.CURDIR}/work. For a typical installation this means that a build in /usr/ports// will put the work files in, /usr/ports///work At first glance, this seems to make perfect sense. However, this design has drawbacks. If one wants to make sure there are no stale work directories around, he can either, # cd /usr/ports && make -DNOCLEANDEPENDS Which takes a _long_ time, or # find /usr/ports -type d -name work -exec rm -rf {} \; Which is somewhat faster, but a bit dangerous. I would claim that it is better to put all WRKDIRs in a central location. For example, /usr/ports/work. This has the advantage that when one wishes to clean out old work directories, a single, # rm -rf /usr/ports/work/* Will do the trick. This also brings work directories into line with how distfiles are stored. After all, distfiles are all by default placed in /usr/ports/distfiles, they aren't kept in ${.CURDIR}/distfiles even though that would work fine. The only drawback I can see is that it might be marginally harder for the novice ports user to find the work directory. However, anyone who plans to go hacking into the build directory should probably have the skills to find it. The vast majority of ports users will never know the difference. >How-To-Repeat: N/A >Fix: For anyone wishing to do this for themselves, a simple, WRKDIRPREFIX?= /usr/ports/work In /etc/make.conf will do it. However, the reason for the PR is that I believe somemthing like this would be a better default than the current design. Just inserting the line above into Mk/bsd.ports.mk would do it. There are also fancier ways to go so that the build takes place in, /usr/ports/work// But they may break existing localizations whereas changing the default WRKDIRPREFIX from null to something else should not cause any back-portablility issues. >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message