Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 30 Mar 2002 12:34:11 +0200 (SAT)
From:      John Hay <jhay@icomtek.csir.co.za>
To:        lioux@FreeBSD.org (Mario Sergio Fujikawa Ferreira)
Cc:        ports@FreeBSD.org
Subject:   Re: fetch-list usage?
Message-ID:  <200203301034.g2UAYBG67346@zibbi.icomtek.csir.co.za>
In-Reply-To: <20020329025020.60126.qmail@exxodus.fedaykin.here> from Mario Sergio Fujikawa Ferreira at "Mar 28, 2002 11:49:58 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
> > 
> > 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200203301034.g2UAYBG67346>