diff options
Diffstat (limited to 'bitbake/lib/layerindexlib')
-rw-r--r-- | bitbake/lib/layerindexlib/__init__.py | 24 | ||||
-rw-r--r-- | bitbake/lib/layerindexlib/cooker.py | 2 | ||||
-rw-r--r-- | bitbake/lib/layerindexlib/restapi.py | 4 | ||||
-rw-r--r-- | bitbake/lib/layerindexlib/tests/restapi.py | 2 |
4 files changed, 19 insertions, 13 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: |
diff --git a/bitbake/lib/layerindexlib/cooker.py b/bitbake/lib/layerindexlib/cooker.py index 2de6e5faa0..ced3e06360 100644 --- a/bitbake/lib/layerindexlib/cooker.py +++ b/bitbake/lib/layerindexlib/cooker.py | |||
@@ -279,7 +279,7 @@ class CookerPlugin(layerindexlib.plugin.IndexPlugin): | |||
279 | summary=pn, description=pn, section='?', | 279 | summary=pn, description=pn, section='?', |
280 | license='?', homepage='?', bugtracker='?', | 280 | license='?', homepage='?', bugtracker='?', |
281 | provides='?', bbclassextend='?', inherits='?', | 281 | provides='?', bbclassextend='?', inherits='?', |
282 | blacklisted='?', layerbranch=depBranchId) | 282 | disallowed='?', layerbranch=depBranchId) |
283 | 283 | ||
284 | index = addElement("recipes", [recipe], index) | 284 | index = addElement("recipes", [recipe], index) |
285 | 285 | ||
diff --git a/bitbake/lib/layerindexlib/restapi.py b/bitbake/lib/layerindexlib/restapi.py index 26a1c9674e..81d99b02ea 100644 --- a/bitbake/lib/layerindexlib/restapi.py +++ b/bitbake/lib/layerindexlib/restapi.py | |||
@@ -31,7 +31,7 @@ class RestApiPlugin(layerindexlib.plugin.IndexPlugin): | |||
31 | The return value is a LayerIndexObj. | 31 | The return value is a LayerIndexObj. |
32 | 32 | ||
33 | url is the url to the rest api of the layer index, such as: | 33 | url is the url to the rest api of the layer index, such as: |
34 | http://layers.openembedded.org/layerindex/api/ | 34 | https://layers.openembedded.org/layerindex/api/ |
35 | 35 | ||
36 | Or a local file... | 36 | Or a local file... |
37 | """ | 37 | """ |
@@ -138,7 +138,7 @@ class RestApiPlugin(layerindexlib.plugin.IndexPlugin): | |||
138 | The return value is a LayerIndexObj. | 138 | The return value is a LayerIndexObj. |
139 | 139 | ||
140 | ud is the parsed url to the rest api of the layer index, such as: | 140 | ud is the parsed url to the rest api of the layer index, such as: |
141 | http://layers.openembedded.org/layerindex/api/ | 141 | https://layers.openembedded.org/layerindex/api/ |
142 | """ | 142 | """ |
143 | 143 | ||
144 | def _get_json_response(apiurl=None, username=None, password=None, retry=True): | 144 | def _get_json_response(apiurl=None, username=None, password=None, retry=True): |
diff --git a/bitbake/lib/layerindexlib/tests/restapi.py b/bitbake/lib/layerindexlib/tests/restapi.py index 33b5c1c4c8..71f0ae8a9d 100644 --- a/bitbake/lib/layerindexlib/tests/restapi.py +++ b/bitbake/lib/layerindexlib/tests/restapi.py | |||
@@ -22,7 +22,7 @@ class LayerIndexWebRestApiTest(LayersTest): | |||
22 | self.assertFalse(os.environ.get("BB_SKIP_NETTESTS") == "yes", msg="BB_SKIP_NETTESTS set, but we tried to test anyway") | 22 | self.assertFalse(os.environ.get("BB_SKIP_NETTESTS") == "yes", msg="BB_SKIP_NETTESTS set, but we tried to test anyway") |
23 | LayersTest.setUp(self) | 23 | LayersTest.setUp(self) |
24 | self.layerindex = layerindexlib.LayerIndex(self.d) | 24 | self.layerindex = layerindexlib.LayerIndex(self.d) |
25 | self.layerindex.load_layerindex('http://layers.openembedded.org/layerindex/api/;branch=sumo', load=['layerDependencies']) | 25 | self.layerindex.load_layerindex('https://layers.openembedded.org/layerindex/api/;branch=sumo', load=['layerDependencies']) |
26 | 26 | ||
27 | @skipIfNoNetwork() | 27 | @skipIfNoNetwork() |
28 | def test_layerindex_is_empty(self): | 28 | def test_layerindex_is_empty(self): |