[PATCH 3/3] patman: fix project-defaults not propagating into parsers

Simon Glass sjg at chromium.org
Wed Nov 25 00:41:38 CET 2020


Hi Philipp,

On Tue, 24 Nov 2020 at 10:15, Philipp Tomsich <philipp.tomsich at vrull.eu> wrote:
>
> Project defaults (e.g. for linux and gcc) do not propagate into the
> subparsers.  As both the processing of tags (e.g. in the defaults
> for the linux project) and supressing the signoff (in the defaults
> for the gcc project) are settings from subparsers, these would still
> require an explicit commandline option mirroring the (ignored) default.
>
> This change ensures that defaults are updated in all parsers.
>
> Signed-off-by: Philipp Tomsich <philipp.tomsich at vrull.eu>
> ---
>
>  tools/patman/settings.py | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/tools/patman/settings.py b/tools/patman/settings.py
> index bb3f868..dc57b2f 100644
> --- a/tools/patman/settings.py
> +++ b/tools/patman/settings.py
> @@ -266,7 +266,8 @@ def _UpdateDefaults(main_parser, config):
>              print("WARNING: Unknown setting %s" % name)
>
>      # Set all the defaults (this propagates through all subparsers)
> -    main_parser.set_defaults(**defaults)
> +    for parser in parsers:
> +        parser.set_defaults(**defaults)

According to the Python documentation and my testing, it should
propagate. Do you know what is going wrong here? If there is a
problem, we should update the comment.

>
>  def _ReadAliasFile(fname):
>      """Read in the U-Boot git alias file if it exists.
> --
> 1.8.3.1
>

Regards,
Simon


More information about the U-Boot mailing list