diff options
| author | Johannes Schneider <johannes.schneider@leica-geosystems.com> | 2025-10-12 19:47:26 +0200 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-10-14 11:24:57 +0100 |
| commit | 897f3020daa12ae9e70943c82f780515b1666e9b (patch) | |
| tree | 0154e29063a857858ef163cfbfc5d1734af1ba05 /bitbake/bin/bitbake-setup | |
| parent | 12d456bc9b1a6e9c4e776cad7b751a9bfa82c319 (diff) | |
| download | poky-897f3020daa12ae9e70943c82f780515b1666e9b.tar.gz | |
bitbake: bitbake-setup: add 'metavar' for self-descriptive parameters
Add a metavar to the argparse options to have a self-descriptive help text.
Otherwise argpase defaults to use the argument name in all-uppercase.
Before:
usage: bitbake-setup [-h] [-d] [-q] [--color COLOR] [--no-network] [--global-settings GLOBAL_SETTINGS] [--setting SETTING SETTING SETTING]
{list,init,status,update,install-buildtools,settings} ...
After:
usage: bitbake-setup [-h] [-d] [-q] [--color COLOR] [--no-network] [--global-settings PATH] [--setting SECTION SETTING VALUE]
{list,init,status,update,install-buildtools,settings} ...
(Bitbake rev: 83cecc9356a0684f90249d527fe372298ae92719)
Signed-off-by: Johannes Schneider <johannes.schneider@leica-geosystems.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/bin/bitbake-setup')
| -rwxr-xr-x | bitbake/bin/bitbake-setup | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/bitbake/bin/bitbake-setup b/bitbake/bin/bitbake-setup index 94514fd294..94e38b472c 100755 --- a/bitbake/bin/bitbake-setup +++ b/bitbake/bin/bitbake-setup | |||
| @@ -751,8 +751,9 @@ def main(): | |||
| 751 | parser.add_argument('-q', '--quiet', help='Print only errors', action='store_true') | 751 | parser.add_argument('-q', '--quiet', help='Print only errors', action='store_true') |
| 752 | parser.add_argument('--color', choices=['auto', 'always', 'never'], default='auto', help='Colorize output (where %(metavar)s is %(choices)s)', metavar='COLOR') | 752 | parser.add_argument('--color', choices=['auto', 'always', 'never'], default='auto', help='Colorize output (where %(metavar)s is %(choices)s)', metavar='COLOR') |
| 753 | parser.add_argument('--no-network', action='store_true', help='Do not check whether configuration repositories and layer repositories have been updated; use only the local cache.') | 753 | parser.add_argument('--no-network', action='store_true', help='Do not check whether configuration repositories and layer repositories have been updated; use only the local cache.') |
| 754 | parser.add_argument('--global-settings', action='store', help='Path to the global settings file.') | 754 | parser.add_argument('--global-settings', action='store', metavar='PATH', help='Path to the global settings file.') |
| 755 | parser.add_argument('--setting', default=[], dest='cmdline_settings', action='append', nargs=3, | 755 | parser.add_argument('--setting', default=[], action='append', dest='cmdline_settings', |
| 756 | nargs=3, metavar=('SECTION', 'SETTING', 'VALUE'), | ||
| 756 | help='Modify a setting (for this bitbake-setup invocation only), for example "--setting default top-dir-prefix /path/to/top/dir".') | 757 | help='Modify a setting (for this bitbake-setup invocation only), for example "--setting default top-dir-prefix /path/to/top/dir".') |
| 757 | 758 | ||
| 758 | subparsers = parser.add_subparsers() | 759 | subparsers = parser.add_subparsers() |
