summaryrefslogtreecommitdiffstats
path: root/meta/classes/icecc.bbclass
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:29 +0000
commit0dbd5456f9b010cbc2668d708573835a1be28d00 (patch)
treed92cc2fec47424973643aa4740bb8cbb83476352 /meta/classes/icecc.bbclass
parent19c65b25a9a7b5b822dfc1edd21578a14f0a0820 (diff)
downloadpoky-0dbd5456f9b010cbc2668d708573835a1be28d00.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. (From OE-Core rev: d2735ac44887c7e01134d6870a4875a786501eba) Signed-off-by: Tobias Henkel <tobias.henkel@bmw-carit.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/icecc.bbclass')
-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 @@
21# 21#
22#User can specify if specific packages or packages belonging to class should not use icecc to distribute 22#User can specify if specific packages or packages belonging to class should not use icecc to distribute
23#compile jobs to remote machines, but handled localy, by defining ICECC_USER_CLASS_BL and ICECC_PACKAGE_BL 23#compile jobs to remote machines, but handled localy, by defining ICECC_USER_CLASS_BL and ICECC_PACKAGE_BL
24#with the appropriate values in local.conf 24#with the appropriate values in local.conf. In addition the user can force to enable icecc for packages
25#which set an empty PARALLEL_MAKE variable by defining ICECC_USER_PACKAGE_WL.
25######################################################################################### 26#########################################################################################
26#Error checking is kept to minimum so double check any parameters you pass to the class 27#Error checking is kept to minimum so double check any parameters you pass to the class
27########################################################################################### 28###########################################################################################
28 29
29BB_HASHBASE_WHITELIST += "ICECC_PARALLEL_MAKE ICECC_DISABLED ICECC_USER_PACKAGE_BL ICECC_USER_CLASS_BL" 30BB_HASHBASE_WHITELIST += "ICECC_PARALLEL_MAKE ICECC_DISABLED ICECC_USER_PACKAGE_BL ICECC_USER_CLASS_BL ICECC_USER_PACKAGE_WL"
30 31
31ICECC_ENV_EXEC ?= "${STAGING_BINDIR_NATIVE}/icecc-create-env" 32ICECC_ENV_EXEC ?= "${STAGING_BINDIR_NATIVE}/icecc-create-env"
32 33
@@ -104,6 +105,7 @@ def use_icc(bb,d):
104 #for one reason or the other 105 #for one reason or the other
105 system_package_blacklist = [ "uclibc", "glibc", "gcc", "bind", "u-boot", "dhcp-forwarder", "enchant", "connman", "orbit2" ] 106 system_package_blacklist = [ "uclibc", "glibc", "gcc", "bind", "u-boot", "dhcp-forwarder", "enchant", "connman", "orbit2" ]
106 user_package_blacklist = (d.getVar('ICECC_USER_PACKAGE_BL') or "").split() 107 user_package_blacklist = (d.getVar('ICECC_USER_PACKAGE_BL') or "").split()
108 user_package_whitelist = (d.getVar('ICECC_USER_PACKAGE_WL') or "").split()
107 package_blacklist = system_package_blacklist + user_package_blacklist 109 package_blacklist = system_package_blacklist + user_package_blacklist
108 110
109 for black in package_blacklist: 111 for black in package_blacklist:
@@ -111,6 +113,11 @@ def use_icc(bb,d):
111 #bb.note(package_tmp, ' found in blacklist, disable icecc') 113 #bb.note(package_tmp, ' found in blacklist, disable icecc')
112 return "no" 114 return "no"
113 115
116 for white in user_package_whitelist:
117 if white in package_tmp:
118 bb.debug(1, package_tmp, " ", d.expand('${PV})'), " found in whitelist, enable icecc")
119 return "yes"
120
114 if d.getVar('PARALLEL_MAKE') == "": 121 if d.getVar('PARALLEL_MAKE') == "":
115 bb.debug(1, package_tmp, " ", d.expand('${PV}'), " has empty PARALLEL_MAKE, disable icecc") 122 bb.debug(1, package_tmp, " ", d.expand('${PV}'), " has empty PARALLEL_MAKE, disable icecc")
116 return "no" 123 return "no"
@@ -131,7 +138,8 @@ def icc_version(bb, d):
131 return "" 138 return ""
132 139
133 parallel = d.getVar('ICECC_PARALLEL_MAKE') or "" 140 parallel = d.getVar('ICECC_PARALLEL_MAKE') or ""
134 d.setVar("PARALLEL_MAKE", parallel) 141 if not d.getVar('PARALLEL_MAKE') == "":
142 d.setVar("PARALLEL_MAKE", parallel)
135 143
136 if icc_is_native(bb, d): 144 if icc_is_native(bb, d):
137 archive_name = "local-host-env" 145 archive_name = "local-host-env"