| Summary: | buildinfohelper.py Could not match layer dependency | ||
|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] Toaster | Reporter: | Ferry <ferry.toth> |
| Component: | toaster | Assignee: | David Reyna <david.reyna> |
| Status: | RESOLVED FIXED | QA Contact: | Libertad <libertad.gonzalez.de.la.cruz> |
| Severity: | normal | ||
| Priority: | Medium | CC: | ferry.toth, jessica.zhang, stanciux.mihail |
| Version: | 2.2.1 | ||
| Target Milestone: | 2.4 M1 | ||
| Hardware: | x86 | ||
| OS: | x86_64 | ||
| Whiteboard: | |||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Documentation change: | No (bug/feature does not impact docs) | |
|
Description
Ferry
2017-03-13 21:55:13 UTC
Eh sorry, I mean withOUT building the image (not all tasks completed due to the error) What can I do to help debug this? Strangely, when I don't add meta-intel and select qemu (32 or 64bits) it build until completion. Ok, I have done some debugging. The error happens when the layer_version path from the "DepTreeGenerated" event cannot be found in the database's 'orm_layer_version' table. Instrumenting 'store_dependency_information' I see: NOTE: FOO1:^/opt/dreyna/yp-2.2/poky/meta/,5 NOTE: FOO2:OK NOTE: FOO1:^/opt/dreyna/yp-2.2/poky/meta-poky/,5 NOTE: FOO2:OK NOTE: FOO1:^/opt/dreyna/yp-2.2/poky/meta-yocto-bsp/,5 NOTE: FOO2:OK NOTE: FOO1:^/opt/dreyna/yp-2.2/poky/meta-intel/common/,5 <assert fails> When I look at 'orm_layer_version' table directly via the SQLite Database Browser app I see that all instances of the "meta-intel" layer have a local path of "/opt/dreyna/yp-2.2/poky/meta-intel/", which is indeed where it was installed. The problem is that the "meta-intel" layer people have done a trick of having a layer within a layer, specifically "meta-intel/common", which is not found by the code in "buildinfohelper.py". New code will need to added to resolve these cases. Here is the patch for Morty and YP-2.3:
diff --git a/bitbake/lib/bb/ui/buildinfohelper.py b/bitbake/lib/bb/ui/buildinfohelper.py
index 3ddcb2ac6d..f79df9dbc2 100644
--- a/bitbake/lib/bb/ui/buildinfohelper.py
+++ b/bitbake/lib/bb/ui/buildinfohelper.py
@@ -995,6 +995,7 @@ class BuildInfoHelper(object):
# we don't care if we match the trailing slashes
p = re.compile(re.sub("/[^/]*?$","",pathRE))
+ path=re.sub(r'[$^]',r'',pathRE)
# Heuristics: we always match recipe to the deepest layer path in the discovered layers
for lvo in sorted(self.orm_wrapper.layer_version_objects, reverse=True, key=_sort_longest_path):
if p.fullmatch(lvo.local_path):
@@ -1002,6 +1003,10 @@ class BuildInfoHelper(object):
if lvo.layer.local_source_dir:
if p.fullmatch(lvo.layer.local_source_dir):
return lvo
+ if 0 == path.find(lvo.local_path):
+ # sub-layer path inside existing layer
+ return lvo
+
|