Return-Path: X-Original-To: freebsd-ports-bugs@hub.freebsd.org Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6E5A516A4E0 for ; Tue, 15 Aug 2006 16:20:20 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 68B9043D4C for ; Tue, 15 Aug 2006 16:20:16 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k7FGKGq1040114 for ; Tue, 15 Aug 2006 16:20:16 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k7FGKGLA040113; Tue, 15 Aug 2006 16:20:16 GMT (envelope-from gnats) Resent-Date: Tue, 15 Aug 2006 16:20:16 GMT Resent-Message-Id: <200608151620.k7FGKGLA040113@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Shaun Amott Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 64E3416A4DA for ; Tue, 15 Aug 2006 16:17:11 +0000 (UTC) (envelope-from shaun@inerd.com) Received: from dione.picobyte.net (host-212-158-207-124.bulldogdsl.com [212.158.207.124]) by mx1.FreeBSD.org (Postfix) with SMTP id A924443D46 for ; Tue, 15 Aug 2006 16:17:10 +0000 (GMT) (envelope-from shaun@inerd.com) Received: from charon.picobyte.net (charon.picobyte.net [IPv6:2001:4bd0:201e::fe03]) by dione.picobyte.net (Postfix) with ESMTP for ; Tue, 15 Aug 2006 17:17:09 +0100 (BST) Message-Id: <1155658629.21886@charon.picobyte.net> Date: Tue, 15 Aug 2006 17:17:09 +0100 From: Shaun Amott To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/102102: [PATCH] bsd.port.mk: Allow user to ignore DIST_SUBDIR directories X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Shaun Amott List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Aug 2006 16:20:20 -0000 >Number: 102102 >Category: ports >Synopsis: [PATCH] bsd.port.mk: Allow user to ignore DIST_SUBDIR directories >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Tue Aug 15 16:20:15 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Shaun Amott >Release: FreeBSD 6.1-STABLE i386 >Organization: >Environment: >Description: Currently, sharing a common distfiles directory between multiple Operating Systems (e.g. FreeBSD and OpenBSD) is made tricky by the DIST_SUBDIR mechanism implemented by our ports system. It is desirable in some cases to have all distfiles stored directly under ${DISTDIR}, rather than in ${DISTDIR}/${DIST_SUBDIR}, as decided by individual ports. I propose that, for users willing to accept the small risk of filename collisions, a knob to disable DIST_SUBDIR directories be implemented. Nothing changes, other than the location of the downloaded distfiles. >How-To-Repeat: >Fix: --- bsd.port.mk.diff begins here --- Index: bsd.port.mk =================================================================== RCS file: /home/pcvs/ports/Mk/bsd.port.mk,v retrieving revision 1.540 diff -u -r1.540 bsd.port.mk --- bsd.port.mk 14 Aug 2006 13:24:18 -0000 1.540 +++ bsd.port.mk 14 Aug 2006 15:56:29 -0000 @@ -113,6 +113,11 @@ # ${PATCHFILES} will be put in this subdirectory of # ${DISTDIR} (see below). Also they will be fetched in this # subdirectory from FreeBSD mirror sites. +# WITHOUT_DIST_SUBDIR +# If set, DIST_SUBDIR will be ignored locally; i.e. all +# distfiles will be stored directly under ${DISTDIR}, rather +# than ${DISTDIR}/${DIST_SUBDIR}, at the (tiny) risk of filename +# collisions. # ALLFILES - All of ${DISTFILES} and ${PATCHFILES}. # IGNOREFILES - If set, don't perform checksum checks on these files. # NOFETCHFILES - If set, don't download these files from the ${MASTER_SITES} @@ -1314,7 +1319,11 @@ X11BASE:= ${DESTDIR}${X11BASE_REL} LINUXBASE:= ${DESTDIR}${LINUXBASE_REL} DISTDIR?= ${PORTSDIR}/distfiles +.if defined(WITHOUT_DIST_SUBDIR) +_DISTDIR?= ${DISTDIR} +.else _DISTDIR?= ${DISTDIR}/${DIST_SUBDIR} +.endif INDEXDIR?= ${PORTSDIR} .if ${OSVERSION} >= 500036 INDEXFILE?= INDEX-${OSVERSION:C/([0-9]).*/\1/} @@ -4426,7 +4435,7 @@ fi; \ done; \ fi -.if defined(DIST_SUBDIR) +.if defined(DIST_SUBDIR) && !defined(WITHOUT_DIST_SUBDIR) @${ECHO_CMD} "${RMDIR} ${_DISTDIR} 2>/dev/null || ${TRUE}" .endif .endif @@ -4586,7 +4595,12 @@ eval alg_executable=\$$$$alg; \ \ if [ $$alg_executable != "NO" ]; then \ - MKSUM=`$$alg_executable < $$file`; \ + if [ ${WITHOUT_DIST_SUBDIR} ]; then \ + _file=`${ECHO_CMD} $$file | ${SED} -e 's/^${DIST_SUBDIR}\///'`; \ + else \ + _file=$$file; \ + fi; \ + MKSUM=`$$alg_executable < $$_file`; \ CKSUM=`${GREP} "^$$alg ($$pattern)" ${MD5_FILE} | ${AWK} '{print $$4}'`; \ else \ ignore="true"; \ --- bsd.port.mk.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted: