All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Make PNBLACKLIST work with multilibs, code cleanup
@ 2012-08-10 22:57 Peter Seebach
  2012-08-10 22:57 ` [PATCH 1/2] base.bbclass: Expand PNBLACKLIST across multilibs too Peter Seebach
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Peter Seebach @ 2012-08-10 22:57 UTC (permalink / raw)
  To: openembedded-core

First, make PNBLACKLIST work with multilib builds.

Second, just some quick cleanup of the multilib logic that handles
PREFERRED_PROVIDER, PREFERRED_VERSION, and now also PNBLACKLIST.

The following changes since commit 5290e82ecef08b5e573d7442627276d7b42c6b93:
  Saul Wold (1):
        foomatic: fix perl path for target

are available in the git repository at:

  git://git.yoctoproject.org/poky-contrib seebs/blacklist
  http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=seebs/blacklist

Peter Seebach (2):
  base.bbclass: Expand PNBLACKLIST across multilibs too
  base.bbclass: Restructure multilib variable cloning

 meta/classes/base.bbclass |   60 +++++++++++++++++++++++++-------------------
 1 files changed, 34 insertions(+), 26 deletions(-)




^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/2] base.bbclass: Expand PNBLACKLIST across multilibs too
  2012-08-10 22:57 [PATCH 0/2] Make PNBLACKLIST work with multilibs, code cleanup Peter Seebach
@ 2012-08-10 22:57 ` Peter Seebach
  2012-08-10 23:13   ` Peter Seebach
  2012-08-10 22:58 ` [PATCH 2/2] base.bbclass: Restructure multilib variable cloning Peter Seebach
  2012-08-16 18:31 ` [PATCH 0/2] Make PNBLACKLIST work with multilibs, code cleanup Saul Wold
  2 siblings, 1 reply; 5+ messages in thread
From: Peter Seebach @ 2012-08-10 22:57 UTC (permalink / raw)
  To: openembedded-core

The PNBLACKLIST feature does not currently work with multilibs,
because they have different ${PN}. The obvious thing to do is to
do this at the same point that we do the PREFERRED_PROVIDER
and PREFERRED_VERSION fixups. (Making the PNBLACKLIST check
do the for-each-multilib check requires it to do the multilib
list generation repeatedly.)
---
 meta/classes/base.bbclass |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index e15fa26..8677a30 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -151,7 +151,8 @@ def pkgarch_mapping(d):
 
 def preferred_ml_updates(d):
     # If any PREFERRED_PROVIDER or PREFERRED_VERSIONS are set,
-    # we need to mirror these variables in the multilib case
+    # we need to mirror these variables in the multilib case;
+    # likewise the PNBLACKLIST flags.
     multilibs = d.getVar('MULTILIBS', True) or ""
     if not multilibs:
         return
@@ -164,12 +165,19 @@ def preferred_ml_updates(d):
 
     versions = []
     providers = []
+    blacklists = d.getVarFlags('PNBLACKLIST') or []
     for v in d.keys():
         if v.startswith("PREFERRED_VERSION_"):
             versions.append(v)
         if v.startswith("PREFERRED_PROVIDER_"):
             providers.append(v)
 
+    for pkg, reason in blacklists.items():
+        for p in prefixes:
+            newpkg = p + "-" + pkg
+            if not d.getVarFlag('PNBLACKLIST', newpkg, True):
+                d.setVarFlag('PNBLACKLIST', newpkg, reason)
+
     for v in versions:
         val = d.getVar(v, False)
         pkg = v.replace("PREFERRED_VERSION_", "")
-- 
1.7.0.4




^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/2] base.bbclass: Restructure multilib variable cloning
  2012-08-10 22:57 [PATCH 0/2] Make PNBLACKLIST work with multilibs, code cleanup Peter Seebach
  2012-08-10 22:57 ` [PATCH 1/2] base.bbclass: Expand PNBLACKLIST across multilibs too Peter Seebach
@ 2012-08-10 22:58 ` Peter Seebach
  2012-08-16 18:31 ` [PATCH 0/2] Make PNBLACKLIST work with multilibs, code cleanup Saul Wold
  2 siblings, 0 replies; 5+ messages in thread
From: Peter Seebach @ 2012-08-10 22:58 UTC (permalink / raw)
  To: openembedded-core

The checks for -native/-nativesdk packages, and the iteration over
multilibs, are shared between two (now three) blocks of code, and
nothing ever uses the bare multilib name (instead of the multilib
name plus a hyphen), so restructure this a bit. The checks for
-nativesdk/-native packages are now done before checking whether
something is a PREFERRED_* value, and the iteration over the lists
of preferred versions, preferred providers, and blacklists is done
inside a single iteration over multilibs. Out of sheer paranoia,
limit replacements to one.
---
 meta/classes/base.bbclass |   58 ++++++++++++++++++++++----------------------
 1 files changed, 29 insertions(+), 29 deletions(-)

diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index 8677a30..dce7427 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -167,43 +167,43 @@ def preferred_ml_updates(d):
     providers = []
     blacklists = d.getVarFlags('PNBLACKLIST') or []
     for v in d.keys():
+        if v.endswith("-native") or v.endswith("-nativesdk"):
+            continue
         if v.startswith("PREFERRED_VERSION_"):
             versions.append(v)
         if v.startswith("PREFERRED_PROVIDER_"):
             providers.append(v)
 
-    for pkg, reason in blacklists.items():
-        for p in prefixes:
-            newpkg = p + "-" + pkg
+    for p in prefixes:
+        p = p + "-"
+        # Prepend <multilib>- to everything in PNBLACKLIST:
+        for pkg, reason in blacklists.items():
+            newpkg = p + pkg
             if not d.getVarFlag('PNBLACKLIST', newpkg, True):
                 d.setVarFlag('PNBLACKLIST', newpkg, reason)
-
-    for v in versions:
-        val = d.getVar(v, False)
-        pkg = v.replace("PREFERRED_VERSION_", "")
-        if pkg.endswith("-native") or pkg.endswith("-nativesdk"):
-            continue
-        for p in prefixes:
-            newname = "PREFERRED_VERSION_" + p + "-" + pkg
-            if not d.getVar(newname, False):
-                d.setVar(newname, val)
-
-    for prov in providers:
-        val = d.getVar(prov, False)
-        pkg = prov.replace("PREFERRED_PROVIDER_", "")
-        if pkg.endswith("-native") or pkg.endswith("-nativesdk"):
-            continue
-        virt = ""
-        if pkg.startswith("virtual/"):
-             pkg = pkg.replace("virtual/", "")
-             virt = "virtual/"
-        for p in prefixes:
-            newname = "PREFERRED_PROVIDER_" + virt + p + "-" + pkg
+        # Prepend <multilib>- to all PREFERRED_VERSION_ values:
+        for v in versions:
+            val = d.getVar(v, False)
+            name = v.replace("PREFERRED_VERSION_", "PREFERRED_VERSION_" + p, 1)
+            if not d.getVar(name, False):
+                d.setVar(name, val)
+        # Trickier. We don't want lib32-virtual/foo, we want
+        # virtual/lib32-foo. Also, for recipes other than the
+        # kernel, we want to change the provider. So for instance,
+        # PREFERRED_PROVIDER_virtual/xyzzy = "plugh" yields
+        # PREFERRED_PROVIDER_virtual/lib32-xyzzy = "lib32-plugh"
+        for prov in providers:
+            val = d.getVar(prov, False)
+            pkg = prov.replace("PREFERRED_PROVIDER_", "", 1)
+            virt = ""
+            if pkg.startswith("virtual/"):
+                pkg = pkg.replace("virtual/", "", 1)
+                virt = "virtual/"
             if pkg != "kernel":
-                val = p + "-" + val
-            if not d.getVar(newname, False):
-                d.setVar(newname, val)
-
+                val = p + val
+            name = "PREFERRED_PROVIDER_" + virt + p + pkg
+            if not d.getVar(name, False):
+                d.setVar(name, val)
 
     mp = (d.getVar("MULTI_PROVIDER_WHITELIST", True) or "").split()
     extramp = []
-- 
1.7.0.4




^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/2] base.bbclass: Expand PNBLACKLIST across multilibs too
  2012-08-10 22:57 ` [PATCH 1/2] base.bbclass: Expand PNBLACKLIST across multilibs too Peter Seebach
@ 2012-08-10 23:13   ` Peter Seebach
  0 siblings, 0 replies; 5+ messages in thread
From: Peter Seebach @ 2012-08-10 23:13 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Fri, 10 Aug 2012 17:57:59 -0500
Peter Seebach <peter.seebach@windriver.com> wrote:

> The PNBLACKLIST feature does not currently work with multilibs,
> because they have different ${PN}. The obvious thing to do is to
> do this at the same point that we do the PREFERRED_PROVIDER
> and PREFERRED_VERSION fixups. (Making the PNBLACKLIST check
> do the for-each-multilib check requires it to do the multilib
> list generation repeatedly.)
> ---

Oh, look, I forgot my Signed-off-by again. I've updated the
seebs/blacklist tree on contrib with fixed commits.

-s
-- 
Listen, get this.  Nobody with a good compiler needs to be justified.



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 0/2] Make PNBLACKLIST work with multilibs, code cleanup
  2012-08-10 22:57 [PATCH 0/2] Make PNBLACKLIST work with multilibs, code cleanup Peter Seebach
  2012-08-10 22:57 ` [PATCH 1/2] base.bbclass: Expand PNBLACKLIST across multilibs too Peter Seebach
  2012-08-10 22:58 ` [PATCH 2/2] base.bbclass: Restructure multilib variable cloning Peter Seebach
@ 2012-08-16 18:31 ` Saul Wold
  2 siblings, 0 replies; 5+ messages in thread
From: Saul Wold @ 2012-08-16 18:31 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On 08/10/2012 03:57 PM, Peter Seebach wrote:
> First, make PNBLACKLIST work with multilib builds.
>
> Second, just some quick cleanup of the multilib logic that handles
> PREFERRED_PROVIDER, PREFERRED_VERSION, and now also PNBLACKLIST.
>
> The following changes since commit 5290e82ecef08b5e573d7442627276d7b42c6b93:
>    Saul Wold (1):
>          foomatic: fix perl path for target
>
> are available in the git repository at:
>
>    git://git.yoctoproject.org/poky-contrib seebs/blacklist
>    http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=seebs/blacklist
>
> Peter Seebach (2):
>    base.bbclass: Expand PNBLACKLIST across multilibs too
>    base.bbclass: Restructure multilib variable cloning
>
>   meta/classes/base.bbclass |   60 +++++++++++++++++++++++++-------------------
>   1 files changed, 34 insertions(+), 26 deletions(-)
>
Merged into OE-Core

Thanks
	Sau!

>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-08-16 18:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-10 22:57 [PATCH 0/2] Make PNBLACKLIST work with multilibs, code cleanup Peter Seebach
2012-08-10 22:57 ` [PATCH 1/2] base.bbclass: Expand PNBLACKLIST across multilibs too Peter Seebach
2012-08-10 23:13   ` Peter Seebach
2012-08-10 22:58 ` [PATCH 2/2] base.bbclass: Restructure multilib variable cloning Peter Seebach
2012-08-16 18:31 ` [PATCH 0/2] Make PNBLACKLIST work with multilibs, code cleanup Saul Wold

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.