From owner-freebsd-ports Sat Mar 30 2:34:27 2002 Delivered-To: freebsd-ports@freebsd.org Received: from zibbi.icomtek.csir.co.za (zibbi.icomtek.csir.co.za [146.64.24.58]) by hub.freebsd.org (Postfix) with ESMTP id 39C3937B404; Sat, 30 Mar 2002 02:34:18 -0800 (PST) Received: (from jhay@localhost) by zibbi.icomtek.csir.co.za (8.11.6/8.11.6) id g2UAYBG67346; Sat, 30 Mar 2002 12:34:11 +0200 (SAT) (envelope-from jhay) From: John Hay Message-Id: <200203301034.g2UAYBG67346@zibbi.icomtek.csir.co.za> Subject: Re: fetch-list usage? In-Reply-To: <20020329025020.60126.qmail@exxodus.fedaykin.here> from Mario Sergio Fujikawa Ferreira at "Mar 28, 2002 11:49:58 pm" To: lioux@FreeBSD.org (Mario Sergio Fujikawa Ferreira) Date: Sat, 30 Mar 2002 12:34:11 +0200 (SAT) Cc: ports@FreeBSD.org X-Mailer: ELM [version 2.4ME+ PL54 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 > > > > If one use the fetch-list target, how does one know where to put the > > distfiles? Most of them are easy because they just go into > > /usr/ports/distfiles/, but what about ports that use DIST_SUBDIR? > > You could try something like this for qmail port > > cd `make -V DISTDIR -f /usr/ports/mail/qmail/Makefile`/`make -V DIST_SUBDIR -f /usr/ports/mail/qmail/Makefile` && > make -f /usr/ports/mail/qmail/Makefile fetch-list | sh > > Something like that. I just wrote it so I you should test > it to make sure it works. Of course, there are more elegant ways > to do this. My cents in a few minutes :) Well maybe I should say what I am trying to achieve. I'm trying to keep the distfiles on a mirror site uptodate. I don't care if I don't have all of them, I just want as many as possible. Also I don't care too much about the IGNOREFILES because they will just be deleted by distclean.sh everytime and then I have to fetch them everytime. So I ended up going back to using make fetch instead of make fetch-list. I ended up tweaking bsd.port.mk a little, the patch is included at the end. The are 2 tweaks. The one is to disable FETCH_DEPENDS because for my purpose it is evil. It tries to install some ports. The other tweak is so that IGNOREFILES are ignored. Both these tweaks are hidden behind .ifs so that they are not active in the usual case. This allow me to run a script that roughly looks like this: ################## cd /usr/ports cvs -QR update -PAd distclean.sh NO_IGNOREFILES=yes export NOIGNOREFILES NO_FETCH_DEPENDS=yes export NO_FETCH_DEPENDS make -k fetch -DBATCH -DHAVE_MOTIF > /tmp/fetch.out 2>&1 #################### John -- John Hay -- John.Hay@icomtek.csir.co.za / jhay@FreeBSD.org Index: bsd.port.mk =================================================================== RCS file: /home/ncvs/ports/Mk/bsd.port.mk,v retrieving revision 1.406 diff -u -r1.406 bsd.port.mk --- bsd.port.mk 28 Mar 2002 11:24:43 -0000 1.406 +++ bsd.port.mk 28 Mar 2002 18:00:56 -0000 @@ -1559,6 +1559,17 @@ patch-sites: patch-sites-DEFAULT .if defined(IGNOREFILES) +.if defined(NO_IGNOREFILES) +DISTFILES!= \ + for file in ${DISTFILES}; do \ + for tmp in ${IGNOREFILES}; do \ + if [ "$$file" = "$$tmp" ]; then \ + continue 2; \ + fi; \ + done; \ + echo "$$file"; \ + done +.endif .if !defined(CKSUMFILES) CKSUMFILES!= \ for file in ${ALLFILES}; do \ @@ -1762,6 +1773,12 @@ DOCSDIR?= ${PREFIX}/share/doc/${PORTNAME} EXAMPLESDIR?= ${PREFIX}/share/examples/${PORTNAME} DATADIR?= ${PREFIX}/share/${PORTNAME} + +.if defined(NO_FETCH_DEPENDS) +.if defined(FETCH_DEPENDS) +.undef FETCH_DEPENDS +.endif +.endif .MAIN: all To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message