Patchwork multilib: Set PN correctly on cross-canadian extension cases

login
register
mail settings
Submitter Richard Purdie
Date May 30, 2014, 12:31 p.m.
Message ID <1401453081.31309.26.camel@ted>
Download mbox | patch
Permalink /patch/72997/
State New
Headers show

Comments

Richard Purdie - May 30, 2014, 12:31 p.m.
When we extended cross-canadian recipes with multilib, we were seeing failures
since PN was unchanged.

"""
ERROR: Multiple versions of gcc-cross-canadian-i586 are due to be built
(/media/build1/poky/meta/recipes-devtools/gcc/gcc-cross-canadian_4.9.bb
virtual:multilib:lib32:/media/build1/poky/meta/recipes-devtools/gcc/gcc-cross-canadian_4.9.bb).
Only one version of a given PN should be built in any given build.
You likely need to set PREFERRED_VERSION_gcc-cross-canadian-i586 to
select the correct version or don't depend on multiple versions.
"""

This change avoids that error.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

Patch

diff --git a/meta/classes/multilib.bbclass b/meta/classes/multilib.bbclass
index 9a1cb1d..abefc79 100644
--- a/meta/classes/multilib.bbclass
+++ b/meta/classes/multilib.bbclass
@@ -26,6 +26,7 @@  python multilib_virtclass_handler () {
     if bb.data.inherits_class('cross-canadian', e.data):
         e.data.setVar("MLPREFIX", variant + "-")
         override = ":virtclass-multilib-" + variant
+        e.data.setVar("PN", variant + "-" + e.data.getVar("PN", False))
         e.data.setVar("OVERRIDES", e.data.getVar("OVERRIDES", False) + override)
         bb.data.update_data(e.data)
         return