[Buildroot] [PATCH v2 1/6] support/download: Add support to pass options directly to downloaders

Thomas Petazzoni thomas.petazzoni at free-electrons.com
Sun Jul 24 14:00:48 UTC 2016


Hello,

On Fri, 15 Jul 2016 22:47:29 +0200, Yann E. MORIN wrote:

> > ---  
> [--SNIP--]
> > diff --git a/support/download/bzr b/support/download/bzr
> > index e18b01f..9443e03 100755
> > --- a/support/download/bzr
> > +++ b/support/download/bzr
> > @@ -25,6 +25,7 @@ output="${1}"
> >  repo="${2}"
> >  rev="${3}"
> >  basename="${4}"
> > +dl_opts="${5}"  
> 
> So we expect the additional options to be pased as a single string?
> Why not use something like:
> 
>     shift 4 # Get rid of our options
> 
> and then:
> 
>     _bzr export ${verbose} --root="'${basename}/'" --format=tgz \
>         ${timestamp_opt} - "'${repo}'" -r "'${rev}'" \
>         ${timestamp_opt} - "${@}" "'${repo}'" -r "'${rev}'" \
> 
> Ditto for all backends, of course.
> 
> Note: I wrote the above after writing the comment below; that construct
> above would fix the concerns I expressed below.
> 
> (I'm hard to follow, am I not? My brain is really tortuous... ;-] )

Below, you're concerned that "${dl_opts}" will lead to a problem as it
will be an empty "" if no options are passed. But you suggest to use
"${@}" instead, still with "". How does that fix the particular problem
you mentioned below?

Thanks,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com


More information about the buildroot mailing list