diff options
author | Mark Hatle <mark.hatle@windriver.com> | 2018-07-31 18:05:45 -0400 |
---|---|---|
committer | Mark Hatle <mark.hatle@windriver.com> | 2018-09-20 11:09:14 -0400 |
commit | 3c23351b340eac2b599a79d5880864e1fb034af3 (patch) | |
tree | 554acea097cac02417111f3e85e36b0ca3b9016e /lib/bblayers/query.py | |
parent | 464d0339add15bc8b4344ddd1e4c49706e3c0a02 (diff) | |
download | bitbake-contrib-3c23351b340eac2b599a79d5880864e1fb034af3.tar.gz |
WIP
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Diffstat (limited to 'lib/bblayers/query.py')
-rw-r--r-- | lib/bblayers/query.py | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/lib/bblayers/query.py b/lib/bblayers/query.py index 9294dfa88..e15fced3c 100644 --- a/lib/bblayers/query.py +++ b/lib/bblayers/query.py @@ -11,6 +11,8 @@ from bblayers.common import LayerPlugin logger = logging.getLogger('bitbake-layers') +import bblayerlib + def plugin_init(plugins): return QueryPlugin() @@ -19,11 +21,16 @@ def plugin_init(plugins): class QueryPlugin(LayerPlugin): def do_show_layers(self, args): """show current configured layers.""" + bblayers = bblayerlib.BBLayers(self.tinfoil.config_data) + + index = bblayers.load_bblayers() + logger.plain("%s %s %s" % ("layer".ljust(20), "path".ljust(40), "priority")) logger.plain('=' * 74) - for layer, _, regex, pri in self.tinfoil.cooker.bbfile_config_priorities: - layerdir = self.bbfile_collections.get(layer, None) - layername = self.get_layer_name(layerdir) + for id, layerbranch in index.layerBranches.items(): + layername = layerbranch.layer.name + layerdir = layerbranch.layer.localpath + pri = layerbranch.layer.priority logger.plain("%s %s %d" % (layername.ljust(20), layerdir.ljust(40), pri)) def version_str(self, pe, pv, pr = None): @@ -119,6 +126,16 @@ skipped recipes will also be listed, with a " (skipped)" suffix. logger.error('No class named %s found in BBPATH', classfile) sys.exit(1) + bblayers = bblayerlib.BBLayers(self.tinfoil.config_data) + index = bblayers.load_bblayers() + index = bblayers.load_recipes(tinfoil=self.tinfoil, full=False) + + for id, recipe in index.recipes.items(): + logger.plain('%s' % (recipe._data)) + + + sys.exit(1) + pkg_pn = self.tinfoil.cooker.recipecaches[''].pkg_pn (latest_versions, preferred_versions) = self.tinfoil.find_providers() allproviders = self.tinfoil.get_all_providers() |