diff options
| author | Alexander Kanavin <alex@linutronix.de> | 2025-10-30 10:22:45 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-11-03 17:40:41 +0000 |
| commit | db1ba50813ce325dfe4598010b0a8a9237e28eb8 (patch) | |
| tree | bd8efbca1153b8b639a00548628b1cc8642e0556 /meta | |
| parent | 8ec6308bc3268779d305ba18c36e7bff37933e96 (diff) | |
| download | poky-db1ba50813ce325dfe4598010b0a8a9237e28eb8.tar.gz | |
bbconfigbuild/configfragments.py: print fragment descriptions when enabling them
Such descriptions can contain useful or important information, and users may
not see that otherwise at all. To reduce clutter in CI outputs or similar
scenarios, -q option suppresses that printing.
(From OE-Core rev: 7d99882726cd2c2a2c162e0a2636fd7fdd330977)
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
| -rw-r--r-- | meta/lib/bbconfigbuild/configfragments.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/meta/lib/bbconfigbuild/configfragments.py b/meta/lib/bbconfigbuild/configfragments.py index 59e760f290..6fdac33a5d 100644 --- a/meta/lib/bbconfigbuild/configfragments.py +++ b/meta/lib/bbconfigbuild/configfragments.py | |||
| @@ -144,7 +144,11 @@ class ConfigFragmentsPlugin(LayerPlugin): | |||
| 144 | self.create_conf(args.confpath) | 144 | self.create_conf(args.confpath) |
| 145 | modified = bb.utils.edit_metadata_file(args.confpath, ["OE_FRAGMENTS"], enable_helper) | 145 | modified = bb.utils.edit_metadata_file(args.confpath, ["OE_FRAGMENTS"], enable_helper) |
| 146 | if modified: | 146 | if modified: |
| 147 | print("Fragment {} added to {}.".format(", ".join(args.fragmentname), args.confpath)) | 147 | for f in args.fragmentname: |
| 148 | print("Fragment {} added to {}.".format(f, args.confpath)) | ||
| 149 | f_info = self.get_fragment(f, fragments) | ||
| 150 | if f_info and not args.quiet: | ||
| 151 | print('\nFragment summary: {}\n\nFragment description:\n{}\n'.format(f_info['summary'],f_info['description'])) | ||
| 148 | 152 | ||
| 149 | def do_disable_fragment(self, args): | 153 | def do_disable_fragment(self, args): |
| 150 | """ Disable a fragment in the local build configuration """ | 154 | """ Disable a fragment in the local build configuration """ |
| @@ -193,6 +197,7 @@ class ConfigFragmentsPlugin(LayerPlugin): | |||
| 193 | 197 | ||
| 194 | parser_enable_fragment = self.add_command(sp, 'enable-fragment', self.do_enable_fragment, parserecipes=False) | 198 | parser_enable_fragment = self.add_command(sp, 'enable-fragment', self.do_enable_fragment, parserecipes=False) |
| 195 | parser_enable_fragment.add_argument("--confpath", default=default_confpath, help='Configuration file which contains a list of enabled fragments (default is {}).'.format(default_confpath)) | 199 | parser_enable_fragment.add_argument("--confpath", default=default_confpath, help='Configuration file which contains a list of enabled fragments (default is {}).'.format(default_confpath)) |
| 200 | parser_list_fragments.add_argument('--quiet', '-q', action='store_true', help='Do not print descriptions of the newly enabled fragments') | ||
| 196 | parser_enable_fragment.add_argument('fragmentname', help='The name of the fragment (use list-fragments to see them)', nargs='+') | 201 | parser_enable_fragment.add_argument('fragmentname', help='The name of the fragment (use list-fragments to see them)', nargs='+') |
| 197 | 202 | ||
| 198 | parser_disable_fragment = self.add_command(sp, 'disable-fragment', self.do_disable_fragment, parserecipes=False) | 203 | parser_disable_fragment = self.add_command(sp, 'disable-fragment', self.do_disable_fragment, parserecipes=False) |
