Fix dependency ordering

Submitted by Alexandru DAMIAN on Dec. 20, 2012, 3:46 p.m.

Details

Message ID 1356018372-26226-1-git-send-email-alexandru.damian@intel.com
State New
Headers show

Commit Message

Alexandru DAMIAN Dec. 20, 2012, 3:46 p.m.
From: Alexandru DAMIAN <alexandru.damian@intel.com>

This patch fixes the precedence of the dependency list
that may appear when a single package source is split in
multiple binary packages.

The shared lib dependency resolver will prefer the shared
library as found in the package tree instead as it is defined
in the PACKAGES instructions.

The fix will prevent overriding the package name with the
parent package name.

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
---
 meta/classes/package.bbclass |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Patch hide | download patch | download mbox

diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 9885d94..4556315 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -1508,7 +1508,8 @@  python package_do_shlibs() {
                     lib_ver = fd.readline().rstrip()
                     fd.close()
                 for l in lines:
-                    shlib_provider[l.rstrip()] = (dep_pkg, lib_ver)
+                    if not l.rstrip() in shlib_provider:
+                        shlib_provider[l.rstrip()] = (dep_pkg, lib_ver)
 
     bb.utils.unlockfile(lf)
 
@@ -1521,7 +1522,8 @@  python package_do_shlibs() {
             if len(dep_pkg) == 2:
                 lib_ver = dep_pkg[1]
             dep_pkg = dep_pkg[0]
-            shlib_provider[l] = (dep_pkg, lib_ver)
+            if not l in shlib_provider:
+                shlib_provider[l] = (dep_pkg, lib_ver)
 
     for pkg in packages.split():
         bb.debug(2, "calculating shlib requirements for %s" % pkg)

Comments

Ross Burton Dec. 20, 2012, 4 p.m.
On 20 December 2012 15:46, Alex DAMIAN <alexandru.damian@intel.com> wrote:
> This patch fixes the precedence of the dependency list
> that may appear when a single package source is split in
> multiple binary packages.

I'm still confused how this problem (which was discovered in mesa-dri)
doesn't occur on my machine...

Ross