]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
configfragments.py: Correct the help for enable-fragment
authorPeter Kjellerstedt <peter.kjellerstedt@axis.com>
Fri, 21 Nov 2025 13:25:33 +0000 (05:25 -0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 24 Nov 2025 17:48:50 +0000 (17:48 +0000)
The help entry for --quiet had been added to list-fragments rather than
enable-fragment.

Due to the fact that --quiet is a global option, this actually adds a
dummy --quiet option as it would otherwise hide the global option, but
would never be set since any --quiet argument would already have been
parsed when this option is parsed.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/bbconfigbuild/configfragments.py

index fe2c629d927efcad67aef115075b6465d09e56af..efa98fa2a1aaec1bb39deaa93870055c73a0c03f 100644 (file)
@@ -201,7 +201,9 @@ class ConfigFragmentsPlugin(LayerPlugin):
 
         parser_enable_fragment = self.add_command(sp, 'enable-fragment', self.do_enable_fragment, parserecipes=False)
         parser_enable_fragment.add_argument("--confpath", default=default_confpath, help='Configuration file which contains a list of enabled fragments (default is {}).'.format(default_confpath))
-        parser_list_fragments.add_argument('--quiet', '-q', action='store_true', help='Do not print descriptions of the newly enabled fragments')
+        # Store the quiet argument in quiet_dummy. This is because --quiet is a
+        # global option and this one is only here to add an entry for --help.
+        parser_enable_fragment.add_argument('--quiet', '-q', action='store_true', dest='quiet_dummy', help='Do not print descriptions of the newly enabled fragments')
         parser_enable_fragment.add_argument('fragmentname', help='The name of the fragment (use list-fragments to see them)', nargs='+')
 
         parser_disable_fragment = self.add_command(sp, 'disable-fragment', self.do_disable_fragment, parserecipes=False)