diff options
Diffstat (limited to 'bitbake/lib/layerindexlib/cooker.py')
-rw-r--r-- | bitbake/lib/layerindexlib/cooker.py | 30 |
1 files changed, 10 insertions, 20 deletions
diff --git a/bitbake/lib/layerindexlib/cooker.py b/bitbake/lib/layerindexlib/cooker.py index 848f0e2ee2..ced3e06360 100644 --- a/bitbake/lib/layerindexlib/cooker.py +++ b/bitbake/lib/layerindexlib/cooker.py @@ -1,22 +1,12 @@ # Copyright (C) 2016-2018 Wind River Systems, Inc. # -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License version 2 as -# published by the Free Software Foundation. +# SPDX-License-Identifier: GPL-2.0-only # -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA import logging -import json +import os -from collections import OrderedDict, defaultdict +from collections import defaultdict from urllib.parse import unquote, urlparse @@ -84,7 +74,7 @@ class CookerPlugin(layerindexlib.plugin.IndexPlugin): d = self.layerindex.data if not branches: - raise LayerIndexFetchError("No branches specified for _load_bblayers!") + raise layerindexlib.LayerIndexFetchError("No branches specified for _load_bblayers!") index = layerindexlib.LayerIndexObj() @@ -104,7 +94,7 @@ class CookerPlugin(layerindexlib.plugin.IndexPlugin): return index collections = d.getVar('BBFILE_COLLECTIONS') - layerconfs = d.varhistory.get_variable_items_files('BBFILE_COLLECTIONS', d) + layerconfs = d.varhistory.get_variable_items_files('BBFILE_COLLECTIONS') bbfile_collections = {layer: os.path.dirname(os.path.dirname(path)) for layer, path in layerconfs.items()} (_, bb_branch, _, _) = self._get_bitbake_info() @@ -183,7 +173,7 @@ class CookerPlugin(layerindexlib.plugin.IndexPlugin): else: branches = ['HEAD'] - logger.debug(1, "Loading cooker data branches %s" % branches) + logger.debug("Loading cooker data branches %s" % branches) index = self._load_bblayers(branches=branches) @@ -213,7 +203,7 @@ class CookerPlugin(layerindexlib.plugin.IndexPlugin): try: depDict = bb.utils.explode_dep_versions2(deps) except bb.utils.VersionStringException as vse: - bb.fatal('Error parsing LAYERDEPENDS_%s: %s' % (c, str(vse))) + bb.fatal('Error parsing LAYERDEPENDS_%s: %s' % (collection, str(vse))) for dep, oplist in list(depDict.items()): # We need to search ourselves, so use the _ version... @@ -230,7 +220,7 @@ class CookerPlugin(layerindexlib.plugin.IndexPlugin): required=required, layerbranch=layerBranchId, dependency=depLayerBranch.layer_id) - logger.debug(1, '%s requires %s' % (layerDependency.layer.name, layerDependency.dependency.name)) + logger.debug('%s requires %s' % (layerDependency.layer.name, layerDependency.dependency.name)) index.add_element("layerDependencies", [layerDependency]) return layerDependencyId @@ -279,7 +269,7 @@ class CookerPlugin(layerindexlib.plugin.IndexPlugin): layer = bb.utils.get_file_layer(realfn[0], self.config_data) - depBranchId = collection_layerbranch[layer] + depBranchId = collection[layer] recipeId += 1 recipe = layerindexlib.Recipe(index, None) @@ -289,7 +279,7 @@ class CookerPlugin(layerindexlib.plugin.IndexPlugin): summary=pn, description=pn, section='?', license='?', homepage='?', bugtracker='?', provides='?', bbclassextend='?', inherits='?', - blacklisted='?', layerbranch=depBranchId) + disallowed='?', layerbranch=depBranchId) index = addElement("recipes", [recipe], index) |