[OE-core] [PATCH] classextend: Do not extend for that already have multilib prefix
Huang, Jie (Jackie)
Jackie.Huang at windriver.com
Tue Nov 11 01:50:27 UTC 2014
> -----Original Message-----
> From: openembedded-core-bounces at lists.openembedded.org [mailto:openembedded-core-
> bounces at lists.openembedded.org] On Behalf Of jackie.huang at windriver.com
> Sent: Saturday, November 08, 2014 7:20 PM
> To: openembedded-core at lists.openembedded.org
> Subject: [OE-core] [PATCH] classextend: Do not extend for that already have multilib prefix
>
> From: Jackie Huang <jackie.huang at windriver.com>
>
> If a BSP supports two or more multilibs, for example:
>
> MULTILIBS = "multilib:lib32 multilib:lib64"
>
> and a variable is already extended to include multilib variants, for example in populate_sdk_base:
>
> commit 396371588c7fd2d691ca9c39cd02287e43cb665b
> Author: Richard Purdie <richard.purdie at linuxfoundation.org>
> Date: Thu Jul 24 22:09:09 2014 +0100
>
> populate_sdk_base: Extend TOOLCHAIN_TARGET_TASK to include multilib variants
>
> Most people expect the toolchain from a multilib build to contain multilib
> components. This change makes that happen and is easy for users to override
> should they want something different.
>
> Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
>
> The mapping clsextend.map_depends_variable("TOOLCHAIN_TARGET_TASK")
> ends up with a wrong double extended package name like:
>
> lib32-lib64-packagegroup-core-standalone-sdk-target
>
> This patch avoid such issues.
>
> Signed-off-by: Jackie Huang <jackie.huang at windriver.com>
> ---
> meta/lib/oe/classextend.py | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/meta/lib/oe/classextend.py b/meta/lib/oe/classextend.py index 68efca3..5c993de 100644
> --- a/meta/lib/oe/classextend.py
> +++ b/meta/lib/oe/classextend.py
> @@ -57,6 +57,13 @@ class ClassExtender(object):
> if dep.endswith(("-native", "-native-runtime")) or ('nativesdk-' in dep) or ('cross-canadian' in dep)
> or ('-crosssdk-' in dep):
> return dep
> else:
> + # Do not extend for that already have multilib prefix
> + var = self.d.getVar("MULTILIB_VARIANTS", True) or ""
Robert suggests the 'or ""' is not needed, so please ignore this, I will send v2 for the change.
Thanks,
Jackie
> + if var:
> + var = var.split()
> + for v in var:
> + if dep.startswith(v):
> + return dep
> return self.extend_name(dep)
>
> def map_depends_variable(self, varname, suffix = ""):
> --
> 2.0.0
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core at lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
More information about the Openembedded-core
mailing list