On Thu, May 17, 2018 at 07:47:58PM +0200, Matthijs Kooijman wrote:
> Hi Guido,
> > > My suggestion of adding a --git-append-pbuilder-option could solve both
> > > usecases:
> > >  - you can use --git-pbuilder-options on the commandline to override all
> > >    previously set options, including in gbp.conf
> > >  - you can use --git-append-pbuilder-option to extend any previously set
> > >    options.
> > 
> > You would also need to define how option stack over the various gbp.conf
> > files. I don't think we want to go down that road.
> Hm? But isn't there some order defined already? Currently each time the
> option is given it overrides the previous value, so that is similarly
> dependent on the parse order (perhaps even more, since when you only use
> append, the order is irrelevant). Or am I misunderstanding what you mean
> by "stack"?

A --git-append-pbuilder-options would concatenate all options from all
config files and command line then? This would eliminate the usual
overriding of gbp.conf's. That IMHO makes not sense. What would make
sense is:


so you can decide on a per option basis if you want to append to the
currently set value. Each "--git-pbuilder-options" would reset the whole
thing and start over so:

  --git-pbuilder-options="foo" --git-pbuilder-options-append="option1" 

would give

  "foo option1 option2"

where as

  --git-pbuilder-options="foo" --git-pbuilder-options-append="option1" 
--git-pbuilder-options-append="option2" \
  --git-pbuilder-options="bar" --git-pbuilder-options-append="option3"

would give

  "bar option3"

This would also work or gbp.conf. This would have clear overwrite
semantics on the command line and gbp.conf.
 -- Guido

Reply via email to