When creating the rootfs, we look at direct and indirect dependencies
and then after processing them we create a link for rpm/ipk/deb packages
needed for each of them on the deploy directory.

The process looks at dependencies that we've already seen to avoid
copying them twice, but when BB_MULTICONFIG is enabled, the dependencies
themsevlves contain "mc:<mc_name>" in them, so duplicate packages are
not found if they come from different multiconfigs, causing an error
when linking the package file since it already exists.

Check which multiconfig we are currently building and avoid processing
dependencies from other multiconfigs.

Signed-off-by: Alejandro Enedino Hernandez Samaniego <[email protected]>
---
 meta/lib/oe/package_manager.py | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index 392fe7e..444da5d 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -643,10 +643,11 @@ def create_packages_dir(d, subrepo_dir, deploydir, 
taskname, filterbydependencie
 
     taskdepdata = d.getVar("BB_TASKDEPDATA", False)
     mytaskname = d.getVar("BB_RUNTASK")
+    mc = d.getVar("BB_CURRENT_MC")
     pn = d.getVar("PN")
     seendirs = set()
     multilibs = {}
-   
+
     bb.utils.remove(subrepo_dir, recurse=True)
     bb.utils.mkdirhier(subrepo_dir)
 
@@ -660,6 +661,10 @@ def create_packages_dir(d, subrepo_dir, deploydir, 
taskname, filterbydependencie
     for dep in taskdepdata:
         data = taskdepdata[dep]
         if data[1] == mytaskname and data[0] == pn:
+            if mc != 'default':
+                depmc = dep.split(':')[1]
+                if depmc != mc:
+                    continue
             start = dep
             break
     if start is None:
@@ -673,6 +678,11 @@ def create_packages_dir(d, subrepo_dir, deploydir, 
taskname, filterbydependencie
         next = []
         for dep2 in start:
             for dep in taskdepdata[dep2][3]:
+                # We shouldnt care of other multiconfigs
+                if mc != 'default':
+                    depmc = dep.split(':')[1]
+                    if depmc != mc:
+                        continue
                 if taskdepdata[dep][0] != pn:
                     if "do_" + taskname in dep:
                         pkgdeps.add(dep)
-- 
2.7.4

-- 
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Reply via email to