[Buildroot] [PATCH v5 02/11] autobuild-run: use docopt for argument parsing

Thomas Petazzoni thomas.petazzoni at free-electrons.com
Sat Feb 28 19:31:16 UTC 2015


Dear Thomas De Schampheleire,

On Fri, 12 Dec 2014 21:04:47 +0100, Thomas De Schampheleire wrote:

> +    if args['--config']:
> +        ini_config = load_ini_config(args['--config'])
> +        # merge config/args, priority given to config
> +        args = merge(ini_config, args)

As we discussed, I changed this to:

	args = merge(args, ini_config)

since the command line arguments should have priority over the values
defined in the configuration file, like any other Unix tool does.

However, this doesn't seem to work: since the docopt documentation says
that ninstances default value is 1 when no value is defined, I believe
'args' contains a value of 1 for ninstances, and it doesn't fall back
to using the value defined in the configuration file.

Do you see a way of fixing this?

Thanks,

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


More information about the buildroot mailing list