Subject: Re: Packages with dynamic download sites
To: Frederick Bruckman <fredb@immanent.net>
From: David Brownlee <abs@netbsd.org>
List: tech-pkg
Date: 12/27/2001 21:15:43
On Fri, 21 Dec 2001, Frederick Bruckman wrote:

> On Fri, 21 Dec 2001, David Brownlee wrote:
>
> > 	Thanks! - rather than try the getsites.sh for every package would
> > 	it be reasonable to have a DYNAMIC_MASTER_SITES variable which
> > 	could be set to point to the package specific 'MASTER_SITES'
> > 	outputting script?
>
> I was thinking something like that myself. I was leaning towards
> passing the uri (${DYNAMIC_MASTER_SITES_URI}, or so) and ${DISTFILES}
> to the script through it's environment, and triggering an alternative
> to that whole block of shell code on `.ifdef DYNAMIC_MASTER_SITES_URI',
> even though only the "sites" line is different, rather than doing the
> switch within the shell code. That all still assumes that the script
> gets a reserved name, like "patch-*", "distinfo" are reserved names.

	I can go along with the fixed name. Do we have any prior art
	in pkgsrc regarding passing values as arguments vs env variables
	to scripts?

> > @@ -1285,6 +1285,9 @@
> >  	${_PKG_SILENT}${_PKG_DEBUG}cd ${_DISTDIR};			\
> >  	sortedsites=`${SORTED_MASTER_SITES_CMD}`;			\
> >  	sites="${MASTER_SITES_${fetchfile:T}} $$sortedsites";		\
> > +	if [ -n "${DYNAMIC_MASTER_SITES}" ] ; then			\
> > +		sites="`${SH} ${PKGDIR}/${DYNAMIC_MASTER_SITES} ${fetchfile}` $sites"; \
> > +	fi; \
> >  	file="${fetchfile}";						\
> >  	bfile="${fetchfile:T}";						\
> >  	${_CHECK_DIST_PATH};						\
> >
> >
>
>
> Frederick
>
>


-- 
		David/absolute		-- www.netbsd.org: No hype required --