diff options
author | Mark Hatle <mark.hatle@windriver.com> | 2011-09-20 12:06:54 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-09-21 13:32:33 +0100 |
commit | 66fa6b7e13fbcc5f75fb1b8aa3aedfbdbc148688 (patch) | |
tree | 45f092a2ab37d7be6849eb168bef8040dc19a6f0 /meta/classes/multilib_global.bbclass | |
parent | dd63f64155e0fe41c27a8c9be84dfc0a255a3ff7 (diff) | |
download | openembedded-core-66fa6b7e13fbcc5f75fb1b8aa3aedfbdbc148688.tar.gz openembedded-core-66fa6b7e13fbcc5f75fb1b8aa3aedfbdbc148688.tar.bz2 openembedded-core-66fa6b7e13fbcc5f75fb1b8aa3aedfbdbc148688.tar.xz openembedded-core-66fa6b7e13fbcc5f75fb1b8aa3aedfbdbc148688.zip |
multilib_global.bbclass: Fix non-multilib package provides
In non-multilib packages, configured in a multilib configuration we
need to adjust the system provides and rprovides to include the
virtual multilib variant.
This resolves a problem introduced in the
329d864f9bbf94ad3aae8df43d63fe10e4237e4f commit. Where "allarch"
packages were suddenly providing all variants of an object.
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Diffstat (limited to 'meta/classes/multilib_global.bbclass')
-rw-r--r-- | meta/classes/multilib_global.bbclass | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/meta/classes/multilib_global.bbclass b/meta/classes/multilib_global.bbclass index ed14565a6..cd2216389 100644 --- a/meta/classes/multilib_global.bbclass +++ b/meta/classes/multilib_global.bbclass @@ -6,16 +6,33 @@ python multilib_virtclass_handler_global () { if isinstance(e, bb.event.RecipeParsed) and not variant: if bb.data.inherits_class('kernel', e.data) or bb.data.inherits_class('module-base', e.data) or bb.data.inherits_class('allarch', e.data): - origprovs = provs = e.data.getVar("PROVIDES", True) - rprovs = e.data.getVar("RPROVIDES", True) variants = (e.data.getVar("MULTILIB_VARIANTS", True) or "").split() + + # Process PROVIDES + origprovs = provs = e.data.getVar("PROVIDES", True) or "" for variant in variants: provs = provs + " " + multilib_map_variable("PROVIDES", variant, e.data) - for pkg in e.data.getVar("PACKAGES", True).split(): - rprovs = rprovs + " " + variant + "-" + pkg + # Reset to original value so next time around multilib_map_variable works properly e.data.setVar("PROVIDES", origprovs) e.data.setVar("PROVIDES", provs) + + # Process RPROVIDES + origrprovs = rprovs = e.data.getVar("RPROVIDES", True) or "" + for variant in variants: + rprovs = rprovs + " " + multilib_map_variable("RPROVIDES", variant, e.data) + # Reset to original value so next time around multilib_map_variable works properly + e.data.setVar("RPROVIDES", origrprovs) e.data.setVar("RPROVIDES", rprovs) + + # Process RPROVIDES_${PN}... + for pkg in (e.data.getVar("PACKAGES", True) or "").split(): + origrprovs = rprovs = e.data.getVar("RPROVIDES_%s" % pkg, True) or "" + for variant in variants: + rprovs = rprovs + " " + multilib_map_variable("RPROVIDES_%s" % pkg, variant, e.data) + rprovs = rprovs + " " + variant + "-" + pkg + # Reset to original value so next time around multilib_map_variable works properly + e.data.setVar("RPROVIDES_%s" % pkg, origrprovs) + e.data.setVar("RPROVIDES_%s" % pkg, rprovs) } addhandler multilib_virtclass_handler_global @@ -35,7 +52,7 @@ def multilib_extend_name(variant, name): def multilib_map_variable(varname, variant, d): var = d.getVar(varname, True) if not var: - return + return "" var = var.split() newvar = [] for v in var: |