]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
blacklist: Replace class with SKIP_RECIPE variable
authorSaul Wold <Saul.Wold@windriver.com>
Fri, 4 Feb 2022 17:01:40 +0000 (09:01 -0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 21 Feb 2022 23:35:56 +0000 (23:35 +0000)
Remove the old class and rename VarFlag to SKIP_RECIPE, handling this
in base.bbclass for efficiency. This means a separate inherit is no longer
needed.

This change better describes what the VarFlag is doing since it
is implemeted with the SkipRecipe() function.

By moving this into base.bbclass we simplify the distro inherit.

Signed-off-by: Saul Wold <saul.wold@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/base.bbclass
meta/classes/blacklist.bbclass [deleted file]
meta/conf/bitbake.conf
meta/conf/distro/defaultsetup.conf
meta/conf/documentation.conf

index de5135cf6bca00ee23ca8afc7e6f2ae5465ea988..87a4cb5fc778097f8888e7e8f80e825223630c0c 100644 (file)
@@ -438,6 +438,14 @@ python () {
     if os.path.normpath(d.getVar("WORKDIR")) != os.path.normpath(d.getVar("B")):
         d.appendVar("PSEUDO_IGNORE_PATHS", ",${B}")
 
+    # To add a recipe to the skip list , set:
+    #   SKIP_RECIPE[pn] = "message"
+    pn = d.getVar('PN')
+    skip_msg = d.getVarFlag('SKIP_RECIPE', pn)
+    if skip_msg:
+        bb.debug(1, "Skipping %s %s" % (pn, skip_msg))
+        raise bb.parse.SkipRecipe("Recipe will be skipped because: %s" % (skip_msg))
+
     # Handle PACKAGECONFIG
     #
     # These take the form:
diff --git a/meta/classes/blacklist.bbclass b/meta/classes/blacklist.bbclass
deleted file mode 100644 (file)
index dc79422..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-# anonymous support class from originally from angstrom
-# 
-# To use the blacklist, a distribution should include this
-# class in the INHERIT_DISTRO
-#
-# No longer use ANGSTROM_BLACKLIST, instead use a table of
-# recipes in PNBLACKLIST
-#
-# Features:
-#
-# * To add a package to the blacklist, set:
-#   PNBLACKLIST[pn] = "message"
-#
-
-python () {
-    blacklist = d.getVarFlag('PNBLACKLIST', d.getVar('PN'))
-
-    if blacklist:
-        raise bb.parse.SkipRecipe("Recipe is blacklisted: %s" % (blacklist))
-}
index 7faf6f05f405e8ba11a13549b5b648f0ac1d7cac..d60f6facd6e8bd99ddf80da0b60c723943c9339f 100644 (file)
@@ -90,6 +90,8 @@ ROOT_HOME ??= "/home/root"
 # If set to boolean false ('no', 'n', 'false', 'f', '0'), /var/log is on persistent storage.
 VOLATILE_LOG_DIR ?= "yes"
 
+BB_RENAMED_VARIABLES[PNBLACKLIST] = "SKIP_RECIPE"
+
 ##################################################################
 # Architecture-dependent build variables.
 ##################################################################
index b36a4ffffe5164b3c013916b40412e1521f788cb..f6894f3ab56b4462a41045d8f65b0ba7ebfa5406 100644 (file)
@@ -14,9 +14,8 @@ TMPDIR .= "${TCLIBCAPPEND}"
 
 USER_CLASSES ?= ""
 PACKAGE_CLASSES ?= "package_ipk"
-INHERIT_BLACKLIST = "blacklist"
 INHERIT_DISTRO ?= "debian devshell sstate license remove-libtool"
-INHERIT += "${PACKAGE_CLASSES} ${USER_CLASSES} ${INHERIT_DISTRO} ${INHERIT_BLACKLIST}"
+INHERIT += "${PACKAGE_CLASSES} ${USER_CLASSES} ${INHERIT_DISTRO}"
 
 INIT_MANAGER ??= "none"
 require conf/distro/include/init-manager-${INIT_MANAGER}.inc
index 6b50ad08a8be775e12ed03fea624eb5ad82c57a5..9614448a1fe84d644d58ed077cf8368e64915c9c 100644 (file)
@@ -331,7 +331,6 @@ PKGDATA_DIR[doc] = "Points to a shared, global-state directory that holds data g
 PKGDEST[doc] = "Points to the parent directory for files to be packaged after they have been split into individual packages."
 PKGDESTWORK[doc] = "Points to a temporary work area used by the do_package task to write output from the do_packagedata task."
 PN[doc] = "PN refers to a recipe name in the context of a file used by the OpenEmbedded build system as input to create a package. It refers to a package name in the context of a file created or produced by the OpenEmbedded build system."
-PNBLACKLIST[doc] = "Lists recipes you do not want the OpenEmbedded build system to build."
 PR[doc] = "The revision of the recipe. The default value for this variable is 'r0'."
 PREFERRED_PROVIDER[doc] = "If multiple recipes provide an item, this variable determines which recipe should be given preference."
 PREFERRED_VERSION[doc] = "If there are multiple versions of recipes available, this variable determines which recipe should be given preference."
@@ -385,6 +384,7 @@ SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS[doc] = "A list of recipe dependencies that shoul
 SIGGEN_EXCLUDERECIPES_ABISAFE[doc] = "A list of recipes that are completely stable and will never change."
 SITEINFO_BITS[doc] = "Specifies the number of bits for the target system CPU."
 SITEINFO_ENDIANNESS[doc] = "Specifies the endian byte order of the target system. The value should be either 'le' for 'little-endian' or 'be' for 'big-endian'."
+SKIP_RECIPE[doc] = "Lists recipes you do not want the OpenEmbedded build system to build."
 SOC_FAMILY[doc] = "Groups together machines based upon the same family of SOC (System On Chip). You typically set this variable in a common .inc file that you include in the configuration files of all the machines."
 SOLIBS[doc] = "Defines the suffix for shared libraries used on the target platform."
 SOLIBSDEV[doc] = "Defines the suffix for the development symbolic link (symlink) for shared libraries on the target platform."