Skip to contentSkip to conversation

blacklist: add SELFBLACKLIST support

PATCH New Joe Slater 1 participant 1 message Dec 16, 2015

lore
Share & tools
lore

Joe Slater

author
#0 lore raw

PATCH 1/1 blacklist: add SELFBLACKLIST support

BLACKLIST[pn] in a recipe does not work for multilib. Add SELFBLACKLIST specifically for use in recipes.

---
 meta/classes/blacklist.bbclass |   14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)
meta/classes/blacklist.bbclass +11 -3
index a0141a8..a396536 100644
@@ -11,6 +11,9 @@
 # * To add a package to the blacklist, set:
 #   PNBLACKLIST[pn] = "message"
 #
+# * To have a recipe blacklist itself, in the recipe set:
+#   SELFBLACKLIST = "message"
+#
 
 # Cope with PNBLACKLIST flags for multilib case
 addhandler blacklist_multilib_eventhandler
@@ -38,8 +41,13 @@ python blacklist_multilib_eventhandler() {
 }
 
 python () {
-    blacklist = d.getVarFlag('PNBLACKLIST', d.getVar('PN', True), True)
+    reason = d.getVar('SELFBLACKLIST', True)
+
+    if reason:
+        raise bb.parse.SkipPackage("Recipe blacklists itself!: %s" % (reason))
+
+    reason = d.getVarFlag('PNBLACKLIST', d.getVar('PN', True), True)
 
-    if blacklist:
-        raise bb.parse.SkipPackage("Recipe is blacklisted: %s" % (blacklist))
+    if reason:
+        raise bb.parse.SkipPackage("Recipe is blacklisted: %s" % (reason))
 }
Signature · 1 line
1.7.9.5