Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Kang Kai <Kai.Kang@windriver.com>
To: <openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH 1/1] classextend.py: update filter to support multiple multilib items
Date: Fri, 13 Nov 2015 17:16:54 +0800	[thread overview]
Message-ID: <5645AA86.4020308@windriver.com> (raw)
In-Reply-To: <34b5e01814824faf1ed39a94229a4a3da6462d54.1447379573.git.kai.kang@windriver.com>

On 2015年11月13日 10:32, kai.kang@windriver.com wrote:
> From: Kai Kang <kai.kang@windriver.com>
>
> If it is set with two or more mutliblib items, such as:
>
> MULTILIBS = "multilib:lib32 multilib:lib64"
>
> it expands some virtual providers wrongly:
>
> | ERROR: Nothing PROVIDES 'virtual/lib32-lib64-libc'.
>
> Update the filter that do not extend variables which already have
> one of mulitlib prefixes.
>
> Signed-off-by: Kai Kang <kai.kang@windriver.com>
> ---
>   meta/lib/oe/classextend.py | 21 ++++++++++++---------
>   1 file changed, 12 insertions(+), 9 deletions(-)
>
> diff --git a/meta/lib/oe/classextend.py b/meta/lib/oe/classextend.py


It is better to be fixed in toolchain-scripts.bbclass where call the 
fucs of class ClassExtender.
So ignore this one please. I'll send another patch to fix it.

--Kai

> index 5107ecd..6a6affb 100644
> --- a/meta/lib/oe/classextend.py
> +++ b/meta/lib/oe/classextend.py
> @@ -15,10 +15,10 @@ class ClassExtender(object):
>               name = name.replace("-" + self.extname, "")
>           if name.startswith("virtual/"):
>               subs = name.split("/", 1)[1]
> -            if not subs.startswith(self.extname):
> +            if not self.check_prefix(subs):
>                   return "virtual/" + self.extname + "-" + subs
>               return name
> -        if not name.startswith(self.extname):
> +        if not self.check_prefix(name):
>               return self.extname + "-" + name
>           return name
>   
> @@ -57,13 +57,6 @@ 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)
> -            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 = ""):
> @@ -108,6 +101,16 @@ class ClassExtender(object):
>               for subs in variables:
>                   self.d.renameVar("%s_%s" % (subs, pkg_mapping[0]), "%s_%s" % (subs, pkg_mapping[1]))
>   
> +    def check_prefix(self, name):
> +        ml_prefixes = (self.d.getVar("MULTILIB_VARIANTS", True) or "").split()
> +        if self.extname in ml_prefixes:
> +            for var in ml_prefixes:
> +                if name.startswith(var):
> +                    return True
> +            return False
> +        else:
> +            return name.startswith(self.extname)
> +
>   class NativesdkClassExtender(ClassExtender):
>       def map_depends(self, dep):
>           if dep.startswith(self.extname):


-- 
Regards,
Neil | Kai Kang



      reply	other threads:[~2015-11-13  9:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-13  2:32 [PATCH 0/1] Update classextend file to support multiple multilib item kai.kang
2015-11-13  2:32 ` [PATCH 1/1] classextend.py: update filter to support multiple multilib items kai.kang
2015-11-13  9:16   ` Kang Kai [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5645AA86.4020308@windriver.com \
    --to=kai.kang@windriver.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox