Subject: Re: pkg/30246: download-vulnerability-list doesn't use FETCH_CMD
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: Jeremy C. Reed <reed@NetBSD.org>
List: pkgsrc-bugs
Date: 05/16/2005 18:26:01
The following reply was made to PR pkg/30246; it has been noted by GNATS.
From: "Jeremy C. Reed" <reed@NetBSD.org>
To: Quentin Garnier <cube@cubidou.net>
Cc: gnats-bugs@netbsd.org
Subject: Re: pkg/30246: download-vulnerability-list doesn't use FETCH_CMD
Date: Mon, 16 May 2005 11:24:47 -0700 (PDT)
On Mon, 16 May 2005, Quentin Garnier wrote:
> > And the end resulting script:
> >
> > utility=`echo "/usr/bin/ftp" | /usr/bin/awk '{ print $1 }'`
> > case "$utility" in
> > *curl) /usr/bin/ftp ${FETCH_ARGS} -o ${NEW_VUL_LIST} ${VUL_SOURCE} ;;
> > *ftp) /usr/bin/ftp ${FETCH_ARGS} -o ${NEW_VUL_LIST} ${VUL_SOURCE} ;;
> > *wget) /usr/bin/ftp ${FETCH_ARGS} -O ${NEW_VUL_LIST} ${VUL_SOURCE} ;;
> > *fetch) /usr/bin/ftp ${FETCH_ARGS} -o ${NEW_VUL_LIST} ${VUL_SOURCE} ;;
> >
> > The utility is hard-coded once you install as shown above.
> >
> > Notice that curl, wget, fetch would never match in examples (using default
> > ftp) as this was implemented.
>
> The way I look at it, I believe this is the intended behaviour. That
> way it supports about any FETCH_CMD you set for pkgsrc without having
> to do complicated patching in order to make sure the correct options
> are passed to the final command.
If that is the intended behaviour then the resulting script could just
have one line instead of several lines shown above.
That was my initial comment that I posted to tech-pkg. But the maintainer
said "the way it is now allows people to use different FETCH_CMDs." I
assumed that meant that people can define it at run-time and not package
build time.
> Also, note that FETCH_ARGS is documented as settable in
> audit-packages(8), while FETCH_CMD is not.
FETCH_CMD could easily be documented.
Jeremy C. Reed
``Of course it runs NetBSD.''
http://www.NetBSD.org/