diff options
author | Joshua Watt <jpewhacker@gmail.com> | 2020-03-04 14:02:26 -0600 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-03-07 16:07:00 +0000 |
commit | cc1ab55c14d086087ac4f097e206de714222b6bd (patch) | |
tree | 33ac341f7111ba5ece225b7375f6a873dc400bfb /bitbake | |
parent | ecb1d9f31729ca85cfbf54bbbc0c5f16fbe99c4d (diff) | |
download | poky-cc1ab55c14d086087ac4f097e206de714222b6bd.tar.gz |
bitbake: bblayers: query: Add multiconfig option
Adds an option to the show-recipes subcommand that allows the user to
specify which multiconfig should be shown.
(Bitbake rev: 83256115c7b1fdf3fa5129cfba6b9e7cba2ae0da)
Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/bblayers/query.py | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/bitbake/lib/bblayers/query.py b/bitbake/lib/bblayers/query.py index 7db49c8e2a..e2cc310532 100644 --- a/bitbake/lib/bblayers/query.py +++ b/bitbake/lib/bblayers/query.py | |||
@@ -46,7 +46,7 @@ layer, with the preferred version first. Note that skipped recipes that | |||
46 | are overlayed will also be listed, with a " (skipped)" suffix. | 46 | are overlayed will also be listed, with a " (skipped)" suffix. |
47 | """ | 47 | """ |
48 | 48 | ||
49 | items_listed = self.list_recipes('Overlayed recipes', None, True, args.same_version, args.filenames, False, True, None, False, None) | 49 | items_listed = self.list_recipes('Overlayed recipes', None, True, args.same_version, args.filenames, False, True, None, False, None, args.mc) |
50 | 50 | ||
51 | # Check for overlayed .bbclass files | 51 | # Check for overlayed .bbclass files |
52 | classes = collections.defaultdict(list) | 52 | classes = collections.defaultdict(list) |
@@ -112,9 +112,9 @@ skipped recipes will also be listed, with a " (skipped)" suffix. | |||
112 | title = 'Matching recipes:' | 112 | title = 'Matching recipes:' |
113 | else: | 113 | else: |
114 | title = 'Available recipes:' | 114 | title = 'Available recipes:' |
115 | self.list_recipes(title, args.pnspec, False, False, args.filenames, args.recipes_only, args.multiple, args.layer, args.bare, inheritlist) | 115 | self.list_recipes(title, args.pnspec, False, False, args.filenames, args.recipes_only, args.multiple, args.layer, args.bare, inheritlist, args.mc) |
116 | 116 | ||
117 | def list_recipes(self, title, pnspec, show_overlayed_only, show_same_ver_only, show_filenames, show_recipes_only, show_multi_provider_only, selected_layer, bare, inherits): | 117 | def list_recipes(self, title, pnspec, show_overlayed_only, show_same_ver_only, show_filenames, show_recipes_only, show_multi_provider_only, selected_layer, bare, inherits, mc): |
118 | if inherits: | 118 | if inherits: |
119 | bbpath = str(self.tinfoil.config_data.getVar('BBPATH')) | 119 | bbpath = str(self.tinfoil.config_data.getVar('BBPATH')) |
120 | for classname in inherits: | 120 | for classname in inherits: |
@@ -123,14 +123,18 @@ skipped recipes will also be listed, with a " (skipped)" suffix. | |||
123 | logger.error('No class named %s found in BBPATH', classfile) | 123 | logger.error('No class named %s found in BBPATH', classfile) |
124 | sys.exit(1) | 124 | sys.exit(1) |
125 | 125 | ||
126 | pkg_pn = self.tinfoil.cooker.recipecaches[''].pkg_pn | 126 | pkg_pn = self.tinfoil.cooker.recipecaches[mc].pkg_pn |
127 | (latest_versions, preferred_versions) = self.tinfoil.find_providers() | 127 | (latest_versions, preferred_versions) = self.tinfoil.find_providers(mc) |
128 | allproviders = self.tinfoil.get_all_providers() | 128 | allproviders = self.tinfoil.get_all_providers(mc) |
129 | 129 | ||
130 | # Ensure we list skipped recipes | 130 | # Ensure we list skipped recipes |
131 | # We are largely guessing about PN, PV and the preferred version here, | 131 | # We are largely guessing about PN, PV and the preferred version here, |
132 | # but we have no choice since skipped recipes are not fully parsed | 132 | # but we have no choice since skipped recipes are not fully parsed |
133 | skiplist = list(self.tinfoil.cooker.skiplist.keys()) | 133 | skiplist = list(self.tinfoil.cooker.skiplist.keys()) |
134 | mcspec = 'mc:%s:' % mc | ||
135 | if mc: | ||
136 | skiplist = [s[len(mcspec):] for s in skiplist if s.startswith(mcspec)] | ||
137 | |||
134 | for fn in skiplist: | 138 | for fn in skiplist: |
135 | recipe_parts = os.path.splitext(os.path.basename(fn))[0].split('_') | 139 | recipe_parts = os.path.splitext(os.path.basename(fn))[0].split('_') |
136 | p = recipe_parts[0] | 140 | p = recipe_parts[0] |
@@ -187,7 +191,7 @@ skipped recipes will also be listed, with a " (skipped)" suffix. | |||
187 | # We only display once per recipe, we should prefer non extended versions of the | 191 | # We only display once per recipe, we should prefer non extended versions of the |
188 | # recipe if present (so e.g. in OpenEmbedded, openssl rather than nativesdk-openssl | 192 | # recipe if present (so e.g. in OpenEmbedded, openssl rather than nativesdk-openssl |
189 | # which would otherwise sort first). | 193 | # which would otherwise sort first). |
190 | if realfn[1] and realfn[0] in self.tinfoil.cooker.recipecaches[''].pkg_fn: | 194 | if realfn[1] and realfn[0] in self.tinfoil.cooker.recipecaches[mc].pkg_fn: |
191 | continue | 195 | continue |
192 | 196 | ||
193 | if inherits: | 197 | if inherits: |
@@ -496,6 +500,7 @@ NOTE: .bbappend files can impact the dependencies. | |||
496 | parser_show_overlayed = self.add_command(sp, 'show-overlayed', self.do_show_overlayed) | 500 | parser_show_overlayed = self.add_command(sp, 'show-overlayed', self.do_show_overlayed) |
497 | parser_show_overlayed.add_argument('-f', '--filenames', help='instead of the default formatting, list filenames of higher priority recipes with the ones they overlay indented underneath', action='store_true') | 501 | parser_show_overlayed.add_argument('-f', '--filenames', help='instead of the default formatting, list filenames of higher priority recipes with the ones they overlay indented underneath', action='store_true') |
498 | parser_show_overlayed.add_argument('-s', '--same-version', help='only list overlayed recipes where the version is the same', action='store_true') | 502 | parser_show_overlayed.add_argument('-s', '--same-version', help='only list overlayed recipes where the version is the same', action='store_true') |
503 | parser_show_overlayed.add_argument('--mc', help='use specified multiconfig', default='') | ||
499 | 504 | ||
500 | parser_show_recipes = self.add_command(sp, 'show-recipes', self.do_show_recipes) | 505 | parser_show_recipes = self.add_command(sp, 'show-recipes', self.do_show_recipes) |
501 | parser_show_recipes.add_argument('-f', '--filenames', help='instead of the default formatting, list filenames of higher priority recipes with the ones they overlay indented underneath', action='store_true') | 506 | parser_show_recipes.add_argument('-f', '--filenames', help='instead of the default formatting, list filenames of higher priority recipes with the ones they overlay indented underneath', action='store_true') |
@@ -504,6 +509,7 @@ NOTE: .bbappend files can impact the dependencies. | |||
504 | parser_show_recipes.add_argument('-i', '--inherits', help='only list recipes that inherit the named class(es) - separate multiple classes using , (without spaces)', metavar='CLASS', default='') | 509 | parser_show_recipes.add_argument('-i', '--inherits', help='only list recipes that inherit the named class(es) - separate multiple classes using , (without spaces)', metavar='CLASS', default='') |
505 | parser_show_recipes.add_argument('-l', '--layer', help='only list recipes from the selected layer', default='') | 510 | parser_show_recipes.add_argument('-l', '--layer', help='only list recipes from the selected layer', default='') |
506 | parser_show_recipes.add_argument('-b', '--bare', help='output just names without the "(skipped)" marker', action='store_true') | 511 | parser_show_recipes.add_argument('-b', '--bare', help='output just names without the "(skipped)" marker', action='store_true') |
512 | parser_show_recipes.add_argument('--mc', help='use specified multiconfig', default='') | ||
507 | parser_show_recipes.add_argument('pnspec', nargs='*', help='optional recipe name specification (wildcards allowed, enclose in quotes to avoid shell expansion)') | 513 | parser_show_recipes.add_argument('pnspec', nargs='*', help='optional recipe name specification (wildcards allowed, enclose in quotes to avoid shell expansion)') |
508 | 514 | ||
509 | parser_show_appends = self.add_command(sp, 'show-appends', self.do_show_appends) | 515 | parser_show_appends = self.add_command(sp, 'show-appends', self.do_show_appends) |