From: Robert Yang <liezhi.yang@windriver.com>
To: <openembedded-core@lists.openembedded.org>
Subject: [PATCH 1/1] blacklist.bbclass: fix for multilib
Date: Wed, 12 Apr 2017 02:26:31 -0700 [thread overview]
Message-ID: <39e0f6afef521a126a47da4a4b67c5fab185bf0e.1491989148.git.liezhi.yang@windriver.com> (raw)
In-Reply-To: <cover.1491989148.git.liezhi.yang@windriver.com>
* Fixed:
The netmap has been blacklisted in
meta-networking/recipes-kernel/netmap/netmap_git.bb, but lib32-netmap still can
be built (suppose it doesn't depend on another broken recipe netmap-modules, it
is a little complicated, will talk below):
$ bitbake lib32-netmap
This is because of the old code masks on bb.event.ConfigParsed which can only
handle global blacklist, netmap sets blacklist in the recipe, so it can't be
handled, and lib32-netmap can be built. which was incorrect:
blacklist_multilib_eventhandler[eventmask] = "bb.event.ConfigParsed"
Move multilib code into multilib.bbclass can fix the problem easily:
$ bitbake lib32-netmap
ERROR: Nothing PROVIDES 'lib32-netmap'
ERROR: lib32-netmap was skipped: Recipe is blacklisted: BROKEN: <foo>
* Not fixed
Another problem is netmap-modules has also been blacklisted in the recipe, and
the recipe inherits module.bbclass, so multilib.bbclass doesn't handle it as the
code shows:
# There should only be one kernel in multilib configs
# We also skip multilib setup for module packages.
provides = (e.data.getVar("PROVIDES") or "").split()
if "virtual/kernel" in provides or bb.data.inherits_class('module-base', e.data):
raise bb.parse.SkipPackage("We shouldn't have multilib variants for the kernel")
And netmap-modules provides lib32-netmap-modules which is handled in
multilib_global.bbclass, so bitbake lib32-netmap-modules can't show
the blacklist message:
$ bitbake netmap-modules
ERROR: Nothing PROVIDES 'netmap-modules'
ERROR: netmap-modules was skipped: Recipe is blacklisted: BROKEN: <foo>
ERROR: netmap-modules was skipped: We shouldn't have multilib variants for the kernel
$ bitbake lib32-netmap-modules
ERROR: Nothing PROVIDES 'lib32-netmap-modules'. Close matches:
netmap-modules
netmap-modules
lib32-fbset-modes
Note the different messages between netmap-modules and lib32-netmap-modules.
This is because multilib.bbclass doesn't handle the "module" recipe so
there is no PN called lib32-netmap-modules, therefore blacklist.bbclass can't
handle it.
Note, there are two "netmap-modules" which needs to be fixed later.
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
meta/classes/blacklist.bbclass | 25 -------------------------
meta/classes/multilib.bbclass | 6 ++++++
2 files changed, 6 insertions(+), 25 deletions(-)
diff --git a/meta/classes/blacklist.bbclass b/meta/classes/blacklist.bbclass
index 3413a5b0aa..e58564c34e 100644
--- a/meta/classes/blacklist.bbclass
+++ b/meta/classes/blacklist.bbclass
@@ -12,31 +12,6 @@
# PNBLACKLIST[pn] = "message"
#
-# Cope with PNBLACKLIST flags for multilib case
-addhandler blacklist_multilib_eventhandler
-blacklist_multilib_eventhandler[eventmask] = "bb.event.ConfigParsed"
-python blacklist_multilib_eventhandler() {
- multilibs = e.data.getVar('MULTILIBS')
- if not multilibs:
- return
-
- # this block has been copied from base.bbclass so keep it in sync
- prefixes = []
- for ext in multilibs.split():
- eext = ext.split(':')
- if len(eext) > 1 and eext[0] == 'multilib':
- prefixes.append(eext[1])
-
- blacklists = e.data.getVarFlags('PNBLACKLIST') or {}
- for pkg, reason in blacklists.items():
- if pkg.endswith(("-native", "-crosssdk")) or pkg.startswith(("nativesdk-", "virtual/nativesdk-")) or 'cross-canadian' in pkg:
- continue
- for p in prefixes:
- newpkg = p + "-" + pkg
- if not e.data.getVarFlag('PNBLACKLIST', newpkg):
- e.data.setVarFlag('PNBLACKLIST', newpkg, reason)
-}
-
python () {
blacklist = d.getVarFlag('PNBLACKLIST', d.getVar('PN'))
diff --git a/meta/classes/multilib.bbclass b/meta/classes/multilib.bbclass
index 401e0c2cc0..ab04597f93 100644
--- a/meta/classes/multilib.bbclass
+++ b/meta/classes/multilib.bbclass
@@ -53,6 +53,12 @@ python multilib_virtclass_handler () {
override = ":virtclass-multilib-" + variant
+ blacklist = e.data.getVarFlag('PNBLACKLIST', e.data.getVar('PN'))
+ if blacklist:
+ pn_new = variant + "-" + e.data.getVar('PN')
+ if not e.data.getVarFlag('PNBLACKLIST', pn_new):
+ e.data.setVarFlag('PNBLACKLIST', pn_new, blacklist)
+
e.data.setVar("MLPREFIX", variant + "-")
e.data.setVar("PN", variant + "-" + e.data.getVar("PN", False))
e.data.setVar("OVERRIDES", e.data.getVar("OVERRIDES", False) + override)
--
2.11.0.rc2.dirty
prev parent reply other threads:[~2017-04-12 9:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-12 9:26 [PATCH 0/1] blacklist.bbclass: fix for multilib Robert Yang
2017-04-12 9:26 ` Robert Yang [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=39e0f6afef521a126a47da4a4b67c5fab185bf0e.1491989148.git.liezhi.yang@windriver.com \
--to=liezhi.yang@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 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.