[bitbake-devel] [PATCH 3/3 v01] bitbake: bitbake-layers: show-recipes: Enable bare output

Yeoh Ee Peng ee.peng.yeoh at intel.com
Thu Sep 19 10:11:10 UTC 2019


Currently, show-recipes will append "(skipped)" marker to recipes which
were skipped due these recipes does not satisfied the configurations.

Example: $ bitbake-layers show-recipes -r
   ace
   backport-iwlwifi
   core-image-rt (skipped)
   core-image-rt-sdk (skipped)
   core-image-tiny

Add -b/--bare to enable output names without "(skipped)" marker.

Example: $ bitbake-layers show-recipes -r -b
   ace
   backport-iwlwifi
   core-image-rt
   core-image-rt-sdk
   core-image-tiny

Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh at intel.com>
---
 lib/bblayers/query.py | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/lib/bblayers/query.py b/lib/bblayers/query.py
index a100f66..7db49c8 100644
--- a/lib/bblayers/query.py
+++ b/lib/bblayers/query.py
@@ -46,7 +46,7 @@ layer, with the preferred version first. Note that skipped recipes that
 are overlayed will also be listed, with a " (skipped)" suffix.
 """
 
-        items_listed = self.list_recipes('Overlayed recipes', None, True, args.same_version, args.filenames, False, True, None, None)
+        items_listed = self.list_recipes('Overlayed recipes', None, True, args.same_version, args.filenames, False, True, None, False, None)
 
         # Check for overlayed .bbclass files
         classes = collections.defaultdict(list)
@@ -112,9 +112,9 @@ skipped recipes will also be listed, with a " (skipped)" suffix.
             title = 'Matching recipes:'
         else:
             title = 'Available recipes:'
-        self.list_recipes(title, args.pnspec, False, False, args.filenames, args.recipes_only, args.multiple, args.layer, inheritlist)
+        self.list_recipes(title, args.pnspec, False, False, args.filenames, args.recipes_only, args.multiple, args.layer, args.bare, inheritlist)
 
-    def list_recipes(self, title, pnspec, show_overlayed_only, show_same_ver_only, show_filenames, show_recipes_only, show_multi_provider_only, selected_layer, inherits):
+    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):
         if inherits:
             bbpath = str(self.tinfoil.config_data.getVar('BBPATH'))
             for classname in inherits:
@@ -145,7 +145,7 @@ skipped recipes will also be listed, with a " (skipped)" suffix.
 
         def print_item(f, pn, ver, layer, ispref):
             if not selected_layer or layer == selected_layer:
-                if f in skiplist:
+                if not bare and f in skiplist:
                     skipped = ' (skipped)'
                 else:
                     skipped = ''
@@ -503,6 +503,7 @@ NOTE: .bbappend files can impact the dependencies.
         parser_show_recipes.add_argument('-m', '--multiple', help='only list where multiple recipes (in the same layer or different layers) exist for the same recipe name', action='store_true')
         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='')
         parser_show_recipes.add_argument('-l', '--layer', help='only list recipes from the selected layer', default='')
+        parser_show_recipes.add_argument('-b', '--bare', help='output just names without the "(skipped)" marker', action='store_true')
         parser_show_recipes.add_argument('pnspec', nargs='*', help='optional recipe name specification (wildcards allowed, enclose in quotes to avoid shell expansion)')
 
         parser_show_appends = self.add_command(sp, 'show-appends', self.do_show_appends)
-- 
2.7.4



More information about the bitbake-devel mailing list