Subject: Re: Packages with dynamic download sites
To: David Brownlee <abs@netbsd.org>
From: Frederick Bruckman <fredb@immanent.net>
List: tech-pkg
Date: 02/04/2002 12:14:40
On Mon, 4 Feb 2002, David Brownlee wrote:
> Now the fetch logic has been reworked I have an updated patch to
> handle dynamic master sites
I still need to move _CHECK_DIST_PATH out of _FETCH_ALLFILES, so that
the checking is done when the fetch-list script is generated, so it
can be run on another host which has none of the distfiles. I really
messed that up. I haven't really had a chance to look closely at that
yet, so you may as well commit your change, first.
> It calls ${FILESDIR}/getsites.sh with the name of the file wanted,
> and expects it to output the url base at which to find that file.
>
> Does it seem reasonable?
That looks like it calls the script for every file needed by the
package whenever ${DYNAMIC_MASTER_SITES} is set, and never goes to
${_MASTER_SITE_BACKUP}. Is that what you want? (Could be.)
> Index: bsd.pkg.mk
> ===================================================================
> RCS file: /cvsroot/pkgsrc/mk/bsd.pkg.mk,v
> retrieving revision 1.920
> diff -u -B -r1.920 bsd.pkg.mk
> --- bsd.pkg.mk 2002/01/29 15:07:55 1.920
> +++ bsd.pkg.mk 2002/02/04 17:34:15
> @@ -1280,13 +1280,22 @@
> _FETCH_ALLFILES= ${TEST} -d ${_DISTDIR} || ${MKDIR} ${_DISTDIR};
> _FETCH_ALLFILES+= cd ${_DISTDIR};
> . for fetchfile in ${_ALLFILES}
> +. if defined(DYNAMIC_MASTER_SITES)
> _FETCH_ALLFILES+= \
> + file="${fetchfile}"; \
> + bfile="${fetchfile:T}"; \
> + sites=`sh ${FILESDIR}/getsites.sh $${file}`; \
> + ${_CHECK_DIST_PATH}; \
> + ${_FETCH_FILE};
> +. else
> +_FETCH_ALLFILES+= \
> unsorted_sites="${SITES_${fetchfile:T}} ${_MASTER_SITE_BACKUP}"; \
> sites="${ORDERED_SITES}"; \
> file="${fetchfile}"; \
> bfile="${fetchfile:T}"; \
> ${_CHECK_DIST_PATH}; \
> ${_FETCH_FILE};
> +. endif
> . endfor
> . endif
> _FETCH_ALLFILES?= ${DO_NADA}
>
>
Frederick