aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Henkel <tobias.henkel@bmw-carit.de>2013-11-12 09:34:02 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-11-12 16:00:19 +0000
commitd2735ac44887c7e01134d6870a4875a786501eba (patch)
tree5753d7e0f00d39511b78ac8f5efa57ba587cbafe
parentb28bae30fc5d8d1d7cc675ddb4159c39fb9bc3fd (diff)
downloadopenembedded-core-contrib-d2735ac44887c7e01134d6870a4875a786501eba.tar.gz
icecc: Add package whitelist
There are some recipes which parse the PARALLEL_MAKE variable by their own and set them to an empty string afterwards. This disables icecc for this recipe. Adding a whitelist for forcing icecc makes it possible to use icecc also with these recipes. Signed-off-by: Tobias Henkel <tobias.henkel@bmw-carit.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/icecc.bbclass14
1 files changed, 11 insertions, 3 deletions
diff --git a/meta/classes/icecc.bbclass b/meta/classes/icecc.bbclass
index 31ad7a1691..3255839942 100644
--- a/meta/classes/icecc.bbclass
+++ b/meta/classes/icecc.bbclass
@@ -21,12 +21,13 @@
#
#User can specify if specific packages or packages belonging to class should not use icecc to distribute
#compile jobs to remote machines, but handled localy, by defining ICECC_USER_CLASS_BL and ICECC_PACKAGE_BL
-#with the appropriate values in local.conf
+#with the appropriate values in local.conf. In addition the user can force to enable icecc for packages
+#which set an empty PARALLEL_MAKE variable by defining ICECC_USER_PACKAGE_WL.
#########################################################################################
#Error checking is kept to minimum so double check any parameters you pass to the class
###########################################################################################
-BB_HASHBASE_WHITELIST += "ICECC_PARALLEL_MAKE ICECC_DISABLED ICECC_USER_PACKAGE_BL ICECC_USER_CLASS_BL"
+BB_HASHBASE_WHITELIST += "ICECC_PARALLEL_MAKE ICECC_DISABLED ICECC_USER_PACKAGE_BL ICECC_USER_CLASS_BL ICECC_USER_PACKAGE_WL"
ICECC_ENV_EXEC ?= "${STAGING_BINDIR_NATIVE}/icecc-create-env"
@@ -104,6 +105,7 @@ def use_icc(bb,d):
#for one reason or the other
system_package_blacklist = [ "uclibc", "glibc", "gcc", "bind", "u-boot", "dhcp-forwarder", "enchant", "connman", "orbit2" ]
user_package_blacklist = (d.getVar('ICECC_USER_PACKAGE_BL') or "").split()
+ user_package_whitelist = (d.getVar('ICECC_USER_PACKAGE_WL') or "").split()
package_blacklist = system_package_blacklist + user_package_blacklist
for black in package_blacklist:
@@ -111,6 +113,11 @@ def use_icc(bb,d):
#bb.note(package_tmp, ' found in blacklist, disable icecc')
return "no"
+ for white in user_package_whitelist:
+ if white in package_tmp:
+ bb.debug(1, package_tmp, " ", d.expand('${PV})'), " found in whitelist, enable icecc")
+ return "yes"
+
if d.getVar('PARALLEL_MAKE') == "":
bb.debug(1, package_tmp, " ", d.expand('${PV}'), " has empty PARALLEL_MAKE, disable icecc")
return "no"
@@ -131,7 +138,8 @@ def icc_version(bb, d):
return ""
parallel = d.getVar('ICECC_PARALLEL_MAKE') or ""
- d.setVar("PARALLEL_MAKE", parallel)
+ if not d.getVar('PARALLEL_MAKE') == "":
+ d.setVar("PARALLEL_MAKE", parallel)
if icc_is_native(bb, d):
archive_name = "local-host-env"