Date: Fri, 1 Mar 2002 09:40:02 -0800 (PST) From: Maxim Sobolev <sobomax@FreeBSD.org> To: freebsd-ports@FreeBSD.org Subject: Re: ports/35456: [PATCH] Add a distfiles-list target Message-ID: <200203011740.g21He2011302@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR ports/35456; it has been noted by GNATS. From: Maxim Sobolev <sobomax@FreeBSD.org> To: Nik Clayont <nik@nothing-going-on.demon.co.uk> Cc: FreeBSD-gnats-submit@FreeBSD.org Subject: Re: ports/35456: [PATCH] Add a distfiles-list target Date: Fri, 01 Mar 2002 19:34:56 +0200 What's wrong with `cat distinfo'??? Much simpler IMO. BTW, isn't your second name Clayton, not Clayont? :) -Maxim Nik Clayont wrote: > > >Number: 35456 > >Category: ports > >Synopsis: [PATCH] Add a distfiles-list target > >Confidential: no > >Severity: non-critical > >Priority: medium > >Responsible: freebsd-ports > >State: open > >Quarter: > >Keywords: > >Date-Required: > >Class: change-request > >Submitter-Id: current-users > >Arrival-Date: Fri Mar 01 07:10:01 PST 2002 > >Closed-Date: > >Last-Modified: > >Originator: Nik Clayont > >Release: FreeBSD 4.4-STABLE i386 > >Organization: > >Environment: > System: FreeBSD clan.nothing-going-on.org 4.4-STABLE FreeBSD 4.4-STABLE #2: Sun Dec 9 13:46:09 GMT 2001 nik@clan.nothing-going-on.org:/local/1/usr/src/sys/compile/CLAN i386 > > >Description: > > I'm looking at building a small tool to help manage > /usr/ports/distfiles, and keep it clean of obsolete distfiles. > > The first step is to get a list, from each port, of the files it > expects to see in /usr/ports/distfiles. Then I can clear out > all the files in ${DIST_SUBDIR} that aren't claimed by any port. > > From reading the description in bsd.port.mk I thought fetch-list > might do the job. But that prints out the URLs for the > distfiles that will be fetched (more or less), not what the port > expects to see in /usr/ports/distfiles. > > >How-To-Repeat: > > N/A > > >Fix: > > I've added a 'distfiles-list' target to bsd.port.mk. Here's the > patch. Comments? > > Index: bsd.port.mk > =================================================================== > RCS file: /home/ncvs/ports/Mk/bsd.port.mk,v > retrieving revision 1.400 > diff -u -r1.400 bsd.port.mk > --- bsd.port.mk 24 Feb 2002 16:54:34 -0000 1.400 > +++ bsd.port.mk 1 Mar 2002 14:56:29 -0000 > @@ -327,6 +327,7 @@ > # > # Default targets and their behaviors: > # > +# distfiles-list - Show list of distfiles the port expects to see in ${DIST_SUBDIR} > # fetch - Retrieves ${DISTFILES} (and ${PATCHFILES} if defined) > # into ${DISTDIR} as necessary. > # fetch-list - Show list of files that would be retrieved by fetch. > @@ -2706,6 +2707,18 @@ > .if defined(DIST_SUBDIR) > @${ECHO} "${RMDIR} ${_DISTDIR} 2>/dev/null || ${TRUE}" > .endif > +.endif > + > +# Prints out a list of files this port expects to see in in ${DIST_SUBDIR} > + > +.if !target(distfiles-list) > +distfiles-list: > + @for _file in ${DISTFILES} ${PATCH_FILES}; do \ > + if [ ${DIST_SUBDIR} ]; then \ > + echo -n ${DIST_SUBDIR}/ ; \ > + fi ; \ > + echo $$_file; \ > + done > .endif > > # Prints out a list of files to fetch (useful to do a batch fetch) > Index: bsd.port.subdir.mk > =================================================================== > RCS file: /home/ncvs/ports/Mk/bsd.port.subdir.mk,v > retrieving revision 1.41 > diff -u -r1.41 bsd.port.subdir.mk > --- bsd.port.subdir.mk 23 Dec 2001 11:11:40 -0000 1.41 > +++ bsd.port.subdir.mk 1 Mar 2002 14:47:21 -0000 > @@ -84,6 +84,7 @@ > TARGETS+= depends > TARGETS+= describe > TARGETS+= distclean > +TARGETS+= distfiles-list > TARGETS+= extract > TARGETS+= fetch > TARGETS+= fetch-list > >Release-Note: > >Audit-Trail: > >Unformatted: > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-ports" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200203011740.g21He2011302>