ios-xr / gisobuild

Golden ISO build tool for ios-xr
Other
28 stars 14 forks source link

eXR GISO: CLI option can't override item in yaml file #26

Closed skwsk closed 1 year ago

skwsk commented 1 year ago

The below behaviour explained in README is not working

To override any input in the yaml config file, please use the corresponding cli option and parameter. ./src/gisobuild.py --yamlfile <input_yaml_cfg> --label <new_label> The above command will override the label specified in yaml file with new option provided via cli option --label.

cmohapat commented 1 year ago

We will review and update here.

pvpanda commented 1 year ago

The fix you provided is incorrect. it will override everything in 'yaml_args' with whatever is in 'cli_args' including default values. for example:

in yaml: pkglist: [x.rpm, y.rpm]

in cli: gisobuild.py --yaml path/to/yaml/z.yaml

it will become something like as if you have passed: pkglist: []

because [] is the default value if nothing is provided in the cli

The correct fix will be published soon.

skwsk commented 1 year ago

Not sure if it happen with the change I provided because the items in yaml to be override only if the same item in CLI args. In your example, pkglist is not in CLI args. Anyway, it seems you preparing fix so that's good. Looking forward to seeing the fix.