Make PNBLACKLIST work with multilibs, code cleanup
cover Make PNBLACKLIST work with multilibs, code cleanup
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(-)
PATCH 1/2 base.bbclass: Expand PNBLACKLIST across multilibs too
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(-)
meta/classes/base.bbclass +9 -1
@@ -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_", "")
Signature · 1 line
1.7.0.4
Re: [PATCH 1/2] base.bbclass: Expand PNBLACKLIST across multilibs too
Quoted 7 lines · On Fri, 10 Aug 2012 17:57:59 -0500 Peter Seebach <[email protected]>…
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_PROVIDERandPREFERRED_VERSIONfixups. (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
Signature · 1 line
Listen, get this. Nobody with a good compiler needs to be justified.
PATCH 2/2 base.bbclass: Restructure multilib variable cloning
In reply to Peter SeebachThe 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(-)
meta/classes/base.bbclass +29 -29
@@ -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 = []
Signature · 1 line
1.7.0.4
Saul Wold
AppliedQuoted 14 lines · Peter Seebach
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 targetare available in the git repository at:
git://git.yoctoproject.org/poky-contribseebs/blacklist
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=seebs/blacklist
Quoted 7 lines
Peter Seebach (2):
base.bbclass: Expand PNBLACKLIST across multilibs too base.bbclass: Restructure multilib variable cloningmeta/classes/base.bbclass | 60 +++++++++++++++++++++++++------------------- 1 files changed, 34 insertions(+), 26 deletions(-)
Merged into OE-Core
Thanks
Sau!
Quoted 6 lines
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core