From: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
To: James Hilliard <james.hilliard1@gmail.com>
Cc: buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH v2 2/2] scripts/autobuild-run: add --no-toolchains-csv option and drop docopt
Date: Wed, 13 Apr 2022 23:04:07 +0200 [thread overview]
Message-ID: <20220413230407.6c747891@windsurf> (raw)
In-Reply-To: <20220410043227.602485-2-james.hilliard1@gmail.com>
On Sat, 9 Apr 2022 22:32:27 -0600
James Hilliard <james.hilliard1@gmail.com> wrote:
> Since docopt is unmaintained and less flexible than argparse lets
> drop it and migrate to argparse.
>
> Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
Thanks! I think it would have been great to split the conversion from
docopt to argparse from the addition of no-toolchains-csv. Regardless
of that, I wanted to apply, but spotted something incorrect in the help
text, showing that the argparse logic is probably wrong. Look:
--toolchains-csv TOOLCHAINS_CSV
Toolchain configuration file (default: support/config-fragments/autobuild/toolchain-
configs.csv)
--no-toolchains-csv Generate random toolchain configuration (default: support/config-
fragments/autobuild/toolchain-configs.csv)
See how --no-toolchains-csv option has a default value... that doesn't
make any sense?
> + toolchains_csv = parser.add_mutually_exclusive_group(required=False)
> + toolchains_csv.add_argument("--toolchains-csv",
> + dest="toolchains_csv",
> + help="Toolchain configuration file",
> + type=pathlib.Path)
> + toolchains_csv.add_argument("--no-toolchains-csv",
> + dest="toolchains_csv",
> + help="Generate random toolchain configuration",
> + action='store_false')
> + parser.set_defaults(toolchains_csv=pathlib.Path("support/config-fragments/autobuild/toolchain-configs.csv"))
I suppose this is what makes it have this incorrect "default value".
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2022-04-13 21:04 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-10 4:32 [Buildroot] [PATCH v2 1/2] scripts/autobuild-run: fix and default to python3 James Hilliard
2022-04-10 4:32 ` [Buildroot] [PATCH v2 2/2] scripts/autobuild-run: add --no-toolchains-csv option and drop docopt James Hilliard
2022-04-13 21:04 ` Thomas Petazzoni via buildroot [this message]
2022-04-13 21:29 ` James Hilliard
2022-04-13 21:01 ` [Buildroot] [PATCH v2 1/2] scripts/autobuild-run: fix and default to python3 Thomas Petazzoni via buildroot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220413230407.6c747891@windsurf \
--to=buildroot@buildroot.org \
--cc=james.hilliard1@gmail.com \
--cc=thomas.petazzoni@bootlin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox