[OE-core] [PATCH 2/2] blacklist.bbclass: Rename to OE_BLACKLIST and minor cleanup
Mark Hatle
mark.hatle at windriver.com
Wed May 9 16:08:43 UTC 2012
Revise the handling from ANGSTROM_BLACKLIST to OE_BLACKLIST. Preserved
references to ANGSTROM_BLACKLIST for compatibility with existing users.
Rearrange a bit of the code to avoid unncessary steps if the package does
not have a blacklist.
Change the message generation from a note to debug, adjust the SkipPackage
message from:
<distro> DOES NOT support <recipe> because <reason>
to:
Recipe <recipe> is blacklisted: <reason>
Signed-off-by: Mark Hatle <mark.hatle at windriver.com>
---
meta/classes/blacklist.bbclass | 21 ++++++++++++---------
1 files changed, 12 insertions(+), 9 deletions(-)
diff --git a/meta/classes/blacklist.bbclass b/meta/classes/blacklist.bbclass
index 7bf4a73..4bf6629 100644
--- a/meta/classes/blacklist.bbclass
+++ b/meta/classes/blacklist.bbclass
@@ -1,20 +1,23 @@
# anonymous support class from angstrom
#
+# To use the blacklist, a distribution should include this
+# class in the INHERIT_DISTRO
+#
+# Modified to allow default to OE_BLACKLIST, with a fallback
+# to ANGSTROM_BLACKLIST for compatibility
+#
# Features:
#
-# * blacklist handling, set ANGSTROM_BLACKLIST_pn-blah = "message"
+# * blacklist handling, set OE_BLACKLIST_pn-blah = "message"
#
python () {
- import bb
-
- blacklist = bb.data.getVar("ANGSTROM_BLACKLIST", d, 1)
- pkgnm = bb.data.getVar("PN", d, 1)
- distro = bb.data.getVar("DISTRO", d, 1)
+ blacklist = d.getVar("OE_BLACKLIST", True) or d.getVar("ANGSTROM_BLACKLIST", True)
if blacklist:
- bb.note("%s DOES NOT support %s because %s" % (distro,pkgnm, blacklist))
- raise bb.parse.SkipPackage("%s DOES NOT support %s because %s" % (distro,pkgnm, blacklist))
-
+ distro = d.getVar("DISTRO", True)
+ pkgnm = d.getVar("PN", True)
+ bb.debug(2, "%s DOES NOT support %s because %s" % (distro, pkgnm, blacklist))
+ raise bb.parse.SkipPackage("Recipe %s is blacklisted: %s" % (pkgnm, blacklist))
}
--
1.7.3.4
More information about the Openembedded-core
mailing list