bitbake-layers: Correct the help description for bitbake-config-build
PATCH v2 1/3 bitbake-layers: Correct the help description for bitbake-config-build
Signed-off-by Peter Kjellerstedt <[email protected]>
---
PATCHv2: No changes.
bin/bitbake-layers | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
bin/bitbake-layers +1 -1
@@ -30,7 +30,7 @@ logger = bb.msg.logger_create(toolname, sys.stdout) def main(): parser = argparse.ArgumentParser( - description="BitBake layers utility", + description={"bitbake-layers":"BitBake layers utility", "bitbake-config-build":"BitBake build configuration utility"}[toolname], epilog="Use %(prog)s <subcommand> --help to get help on a specific command", add_help=False) parser.add_argument('-d', '--debug', help='Enable debug output', action='store_true')
PATCH v2 2/3 bitbake-layers: Remove the --force option for bitbake-config-build
There is currently no use for it, and its help message makes no sense in the context of bitbake-config-build.
Signed-off-by Peter Kjellerstedt <[email protected]>
---
PATCHv2: Set the default for --force in a more idiomatic way.
bin/bitbake-layers | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
bin/bitbake-layers +6 -1
@@ -35,9 +35,14 @@ def main(): add_help=False) parser.add_argument('-d', '--debug', help='Enable debug output', action='store_true') parser.add_argument('-q', '--quiet', help='Print only errors', action='store_true') - parser.add_argument('-F', '--force', help='Forced execution: can be specified multiple times. -F will force add without recipe parse verification and -FF will additionally force the run withput layer parsing.', action='count', default=0) + if toolname == "bitbake-layers": + parser.add_argument('-F', '--force', help='Forced execution: can be specified multiple times. -F will force add without recipe parse verification and -FF will additionally force the run without layer parsing.', action='count') parser.add_argument('--color', choices=['auto', 'always', 'never'], default='auto', help='Colorize output (where %(metavar)s is %(choices)s)', metavar='COLOR') + # Set the default for --force here rather than above so that it is always + # defined even if the option is not available. + parser.set_defaults(force=0) + global_args, unparsed_args = parser.parse_known_args() # Help is added here rather than via add_help=True, as we don't want it to
PATCH v2 3/3 ast: Improve output when a fragment cannot be found
In reply to Peter KjellerstedtShow the list of searched layers as one layer per line rather than just dumping the contents of the BBLAYERS variable.
Signed-off-by Peter Kjellerstedt <[email protected]>
---
PATCHv2: No changes.
lib/bb/parse/ast.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
lib/bb/parse/ast.py +1 -1
@@ -427,7 +427,7 @@ class AddFragmentsNode(AstNode): data.setVarFlag(flagged_var, f, val) data.setVar(flagged_var, None) else: - bb.fatal("Could not find fragment {} in enabled layers: {}".format(f, layers)) + bb.fatal("Could not find fragment {} in enabled layers:\n\t{}".format(f, "\n\t".join(layers.split()))) def handleInclude(statements, filename, lineno, m, force): statements.append(IncludeNode(filename, lineno, m.group(1), force))