Patchwork base.bbclass: Fix incorrect setting of multilib PREFERRED_PROVIDER_virtual_pkg

login
register
mail settings
Submitter Mark Hatle
Date Nov. 21, 2013, 6:54 a.m.
Message ID <1385016840-22027-1-git-send-email-mark.hatle@windriver.com>
Download mbox | patch
Permalink /patch/62071/
State New
Headers show

Comments

Mark Hatle - Nov. 21, 2013, 6:54 a.m.
From: Lei Liu <lei.liu2@windriver.com>

PREFERRED_PROVIDER_virtual_pkg has been incorrectly set with more
than one multilib prefixes.  For example, if we have two alternative
multilibs lib64 and lib32, PREFERRED_PROVIDER_virtual_pkg will be
set to lib32-lib64-pkg or lib64-lib32-pkg, depending on which
multilib shows up first in the list.

Signed-off-by: Lei Liu <lei.liu2@windriver.com>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
 meta/classes/base.bbclass | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Patch

diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index fc6abf9..dfd77b9 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -210,7 +210,7 @@  def preferred_ml_updates(d):
             virt = "virtual/"
         for p in prefixes:
             if pkg != "kernel":
-                val = p + "-" + val
+                newval = p + "-" + val
 
             # implement variable keys
             localdata = bb.data.createCopy(d)
@@ -219,12 +219,12 @@  def preferred_ml_updates(d):
             bb.data.update_data(localdata)
             newname = localdata.expand(prov)
             if newname != prov and not d.getVar(newname, False):
-                d.setVar(newname, localdata.expand(val))
+                d.setVar(newname, localdata.expand(newval))
 
             # implement alternative multilib name
             newname = localdata.expand("PREFERRED_PROVIDER_" + virt + p + "-" + pkg)
             if not d.getVar(newname, False):
-                d.setVar(newname, val)
+                d.setVar(newname, newval)
         # Avoid future variable key expansion
         provexp = d.expand(prov)
         if prov != provexp and d.getVar(prov, False):