diff options
Diffstat (limited to 'bitbake/lib/layerindexlib/__init__.py')
-rw-r--r-- | bitbake/lib/layerindexlib/__init__.py | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/bitbake/lib/layerindexlib/__init__.py b/bitbake/lib/layerindexlib/__init__.py index 9ca127b9df..c3265ddaa1 100644 --- a/bitbake/lib/layerindexlib/__init__.py +++ b/bitbake/lib/layerindexlib/__init__.py | |||
@@ -6,7 +6,6 @@ | |||
6 | import datetime | 6 | import datetime |
7 | 7 | ||
8 | import logging | 8 | import logging |
9 | import imp | ||
10 | import os | 9 | import os |
11 | 10 | ||
12 | from collections import OrderedDict | 11 | from collections import OrderedDict |
@@ -179,9 +178,9 @@ class LayerIndex(): | |||
179 | '''Load the layerindex. | 178 | '''Load the layerindex. |
180 | 179 | ||
181 | indexURI - An index to load. (Use multiple calls to load multiple indexes) | 180 | indexURI - An index to load. (Use multiple calls to load multiple indexes) |
182 | 181 | ||
183 | reload - If reload is True, then any previously loaded indexes will be forgotten. | 182 | reload - If reload is True, then any previously loaded indexes will be forgotten. |
184 | 183 | ||
185 | load - List of elements to load. Default loads all items. | 184 | load - List of elements to load. Default loads all items. |
186 | Note: plugs may ignore this. | 185 | Note: plugs may ignore this. |
187 | 186 | ||
@@ -199,7 +198,7 @@ The format of the indexURI: | |||
199 | 198 | ||
200 | For example: | 199 | For example: |
201 | 200 | ||
202 | http://layers.openembedded.org/layerindex/api/;branch=master;desc=OpenEmbedded%20Layer%20Index | 201 | https://layers.openembedded.org/layerindex/api/;branch=master;desc=OpenEmbedded%20Layer%20Index |
203 | cooker:// | 202 | cooker:// |
204 | ''' | 203 | ''' |
205 | if reload: | 204 | if reload: |
@@ -384,7 +383,14 @@ layerBranches set. If not, they are effectively blank.''' | |||
384 | 383 | ||
385 | # Get a list of dependencies and then recursively process them | 384 | # Get a list of dependencies and then recursively process them |
386 | for layerdependency in layerbranch.index.layerDependencies_layerBranchId[layerbranch.id]: | 385 | for layerdependency in layerbranch.index.layerDependencies_layerBranchId[layerbranch.id]: |
387 | deplayerbranch = layerdependency.dependency_layerBranch | 386 | try: |
387 | deplayerbranch = layerdependency.dependency_layerBranch | ||
388 | except AttributeError as e: | ||
389 | logger.error('LayerBranch does not exist for dependent layer {}:{}\n' \ | ||
390 | ' Cannot continue successfully.\n' \ | ||
391 | ' You might be able to resolve this by checking out the layer locally.\n' \ | ||
392 | ' Consider reaching out the to the layer maintainers or the layerindex admins' \ | ||
393 | .format(layerdependency.dependency.name, layerbranch.branch.name)) | ||
388 | 394 | ||
389 | if ignores and deplayerbranch.layer.name in ignores: | 395 | if ignores and deplayerbranch.layer.name in ignores: |
390 | continue | 396 | continue |
@@ -577,7 +583,7 @@ This function is used to implement debugging and provide the user info. | |||
577 | # index['config'] - configuration data for this index | 583 | # index['config'] - configuration data for this index |
578 | # index['branches'] - dictionary of Branch objects, by id number | 584 | # index['branches'] - dictionary of Branch objects, by id number |
579 | # index['layerItems'] - dictionary of layerItem objects, by id number | 585 | # index['layerItems'] - dictionary of layerItem objects, by id number |
580 | # ...etc... (See: http://layers.openembedded.org/layerindex/api/) | 586 | # ...etc... (See: https://layers.openembedded.org/layerindex/api/) |
581 | # | 587 | # |
582 | # The class needs to manage the 'index' entries and allow easily adding | 588 | # The class needs to manage the 'index' entries and allow easily adding |
583 | # of new items, as well as simply loading of the items. | 589 | # of new items, as well as simply loading of the items. |
@@ -847,7 +853,7 @@ class LayerIndexObj(): | |||
847 | continue | 853 | continue |
848 | 854 | ||
849 | for layerdependency in layerbranch.index.layerDependencies_layerBranchId[layerbranch.id]: | 855 | for layerdependency in layerbranch.index.layerDependencies_layerBranchId[layerbranch.id]: |
850 | deplayerbranch = layerdependency.dependency_layerBranch | 856 | deplayerbranch = layerdependency.dependency_layerBranch or None |
851 | 857 | ||
852 | if ignores and deplayerbranch.layer.name in ignores: | 858 | if ignores and deplayerbranch.layer.name in ignores: |
853 | continue | 859 | continue |
@@ -1279,7 +1285,7 @@ class Recipe(LayerIndexItemObj_LayerBranch): | |||
1279 | filename, filepath, pn, pv, layerbranch, | 1285 | filename, filepath, pn, pv, layerbranch, |
1280 | summary="", description="", section="", license="", | 1286 | summary="", description="", section="", license="", |
1281 | homepage="", bugtracker="", provides="", bbclassextend="", | 1287 | homepage="", bugtracker="", provides="", bbclassextend="", |
1282 | inherits="", blacklisted="", updated=None): | 1288 | inherits="", disallowed="", updated=None): |
1283 | self.id = id | 1289 | self.id = id |
1284 | self.filename = filename | 1290 | self.filename = filename |
1285 | self.filepath = filepath | 1291 | self.filepath = filepath |
@@ -1295,7 +1301,7 @@ class Recipe(LayerIndexItemObj_LayerBranch): | |||
1295 | self.bbclassextend = bbclassextend | 1301 | self.bbclassextend = bbclassextend |
1296 | self.inherits = inherits | 1302 | self.inherits = inherits |
1297 | self.updated = updated or datetime.datetime.today().isoformat() | 1303 | self.updated = updated or datetime.datetime.today().isoformat() |
1298 | self.blacklisted = blacklisted | 1304 | self.disallowed = disallowed |
1299 | if isinstance(layerbranch, LayerBranch): | 1305 | if isinstance(layerbranch, LayerBranch): |
1300 | self.layerbranch = layerbranch | 1306 | self.layerbranch = layerbranch |
1301 | else: | 1307 | else: |