Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Ed Bartosh <ed.bartosh@linux.intel.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH] native: fix incorrect addition of -native suffix
Date: Thu, 31 Dec 2015 19:03:39 +0200	[thread overview]
Message-ID: <1451581419-30276-1-git-send-email-ed.bartosh@linux.intel.com> (raw)

The code in native.bbclass adds -native suffix for recipes that
don't have it. If native package doesn't have this suffix it
will be added to it. For example perl-native-runtime becomes
perl-native-runtime-native because of this.

Added check to -native- in the recipe name to prevent addition
of -native suffix.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
---
 meta/classes/native.bbclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/classes/native.bbclass b/meta/classes/native.bbclass
index aac2c1e..8bb3244 100644
--- a/meta/classes/native.bbclass
+++ b/meta/classes/native.bbclass
@@ -120,7 +120,7 @@ python native_virtclass_handler () {
         return
 
     pn = e.data.getVar("PN", True)
-    if not pn.endswith("-native"):
+    if not (pn.endswith("-native") or "-native-" in pn):
         return
 
     def map_dependencies(varname, d, suffix = ""):
@@ -136,7 +136,7 @@ python native_virtclass_handler () {
                 continue
             elif "-cross-" in dep:
                 newdeps.append(dep.replace("-cross", "-native"))
-            elif not dep.endswith("-native"):
+            elif not (dep.endswith("-native") or "-native-" in dep):
                 newdeps.append(dep + "-native")
             else:
                 newdeps.append(dep)
-- 
2.1.4



                 reply	other threads:[~2015-12-31 19:00 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1451581419-30276-1-git-send-email-ed.bartosh@linux.intel.com \
    --to=ed.bartosh@linux.intel.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