bitbake-layers: Correct the help description for bitbake-config-build
PATCH 1/3 bitbake-layers: Correct the help description for bitbake-config-build
Signed-off-by Peter Kjellerstedt <[email protected]>
--- 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 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]>
--- bin/bitbake-layers | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
bin/bitbake-layers +5 -1
@@ -35,11 +35,15 @@ 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', default=0) parser.add_argument('--color', choices=['auto', 'always', 'never'], default='auto', help='Colorize output (where %(metavar)s is %(choices)s)', metavar='COLOR') global_args, unparsed_args = parser.parse_known_args() + if toolname != "bitbake-layers": + global_args.force = 0 + # Help is added here rather than via add_help=True, as we don't want it to # be handled by parse_known_args() parser.add_argument('-h', '--help', action='help', default=argparse.SUPPRESS,
PATCH 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]>
--- 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))