Skip to contentSkip to conversation

bitbake-layers: Correct the help description for bitbake-config-build

PATCH New Peter Kjellerstedt 1 participant 3 messages Nov 21, 2025

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/3 bitbake-layers: Correct the help description for bitbake-config-build

---

PATCHv2: No changes.

 bin/bitbake-layers | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
bin/bitbake-layers +1 -1
index 7d929567a..1154eb6d2 100755
@@ -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')
#1 lore raw

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.

---

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
index 1154eb6d2..c49a5f30e 100755
@@ -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
#2 lore raw

PATCH v2 3/3 ast: Improve output when a fragment cannot be found

In reply to Peter Kjellerstedt

Show the list of searched layers as one layer per line rather than just dumping the contents of the BBLAYERS variable.

---

PATCHv2: No changes.

 lib/bb/parse/ast.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/bb/parse/ast.py +1 -1
index 69e9f166c..e23ef6db3 100644
@@ -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))