Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 8 Nov 1998 03:05:11 -0600 (CST)
From:      Chris Dillon <cdillon@wolves.k12.mo.us>
To:        Satoshi Asami <asami@FreeBSD.ORG>
Cc:        freebsd-ports@FreeBSD.ORG
Subject:   Re: Way to fetch distfiles for all dependancies?
Message-ID:  <Pine.BSF.4.05.9811080116580.15616-100000@duey.hs.wolves.k12.mo.us>
In-Reply-To: <199811080645.WAA03738@silvia.hip.berkeley.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 7 Nov 1998, Satoshi Asami wrote:

>  * > make fetch DEPENDS_TARGET=fetch
>  * > 
>  * 
>  * Doesn't work here.  I think the reason is that only FETCH_DEPENDS are
>  * fetched with the fetch target, but not {BUILD|RUN|LIB}_DEPENDS or
>  * DEPENDS.  If I were to do a 'make all DEPENDS_TARGET=fetch', it would at
> 
> You're right, sorry.  Try this:
> 
> make fetch depends DEPENDS_TARGET=fetch
> 
> with this patch:
[patch snipped]

Aaah, considerably simpler solution than what I had.  It works, fetching
all dependancies, _but_ if the port is installed locally, it doesn't do
the fetch. If I've installed the port but deleted the distfile, it'll be
missed.  Also, if an older version of the port is installed, the check
to see if the dependancy is installed may succeed and never fetch the
newest distfile.  It doesn't look like there is a way to do that in
bsd.port.mk as-is (I'm looking at a very recent version... 1.294).
Here's how I hacked aroud that... just define
SKIP_DEPEND_INSTALLED_CHECK=1 (too long.. ugh)

Index: bsd.port.mk
===================================================================
RCS file: /devel/ncvs/src/share/mk/bsd.port.mk,v
retrieving revision 1.294
diff -u -r1.294 bsd.port.mk
--- bsd.port.mk	1998/10/30 08:28:02	1.294
+++ bsd.port.mk	1998/11/08 09:00:14
@@ -1845,7 +1845,7 @@
 				notfound=1; \
 			fi; \
 		fi; \
-		if [ $$notfound != 0 ]; then \
+		if [ $$notfound != 0 -o ${SKIP_DEPEND_INSTALLED_CHECK} ]; then \
 			${ECHO_MSG} "===>    Verifying $$target for $$prog in $$dir"; \
 			if [ ! -d "$$dir" ]; then \
 				${ECHO_MSG} "     >> No directory for $$prog.  Skipping.."; \
@@ -1876,7 +1876,7 @@
 		else \
 			target=${DEPENDS_TARGET}; \
 		fi; \
-		if ${LDCONFIG} -r | ${GREP} -qwF -e "-l$$lib"; then \
+		if [ ! ${SKIP_DEPEND_INSTALLED_CHECK} ] && ${LDCONFIG} -r | ${GREP} -qwF -e "-l$$lib"; then \
 			${ECHO_MSG} "===>   ${PKGNAME} depends on shared library: $$lib - found"; \
 		else \
 			${ECHO_MSG} "===>   ${PKGNAME} depends on shared library: $$lib - not found"; \

Run it with 
make fetch depends checksum DEPENDS_TARGET="fetch" SKIP_DEPEND_INSTALLED_CHECK=1
and it works like a charm.  Only thing still missing is the checksum for
the depends (not done in this case, since DEPENDS_TARGET is only
'fetch').  I'll figure that out shortly, I think.  After I sleep. :-)

What you gave me plus the above made it work.

Thanks!


-- Chris Dillon - cdillon@wolves.k12.mo.us - cdillon@inter-linc.net
/* FreeBSD: The fastest and most stable server OS on the planet.
   For Intel x86 and compatibles (SPARC and Alpha under development)
   ( http://www.freebsd.org )                                       */






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?Pine.BSF.4.05.9811080116580.15616-100000>