summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2012-02-13 11:41:31 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-02-22 20:25:30 +0000
commit5210cc40db41a470c561b7bd7193d246c3c7e1f2 (patch)
tree15c08794ca938300f9a35ca22ce0789b8c1791ba
parent0aedc60b02247749ab78230e3d7dfc3542882c8a (diff)
downloadpoky-5210cc40db41a470c561b7bd7193d246c3c7e1f2.tar.gz
bitbake: show appropriate warnings for universe target
When building the universe target: * Show a warning about universe likely producing errors * Multiprovider errors are now shown as warnings Also remove an unused "error" variable in runqueue.py. Fixes [YOCTO #1936] (Bitbake rev: 293c796e8a3d1f74ca1e51017b6dede261612281) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--bitbake/lib/bb/cooker.py4
-rw-r--r--bitbake/lib/bb/runqueue.py10
2 files changed, 11 insertions, 3 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index 1a9cab7dc8..f0778e5a46 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -1084,6 +1084,7 @@ class BBCooker:
1084 if (task == None): 1084 if (task == None):
1085 task = self.configuration.cmd 1085 task = self.configuration.cmd
1086 1086
1087 universe = ('universe' in targets)
1087 targets = self.checkPackages(targets) 1088 targets = self.checkPackages(targets)
1088 1089
1089 def buildTargetsIdle(server, rq, abort): 1090 def buildTargetsIdle(server, rq, abort):
@@ -1127,6 +1128,8 @@ class BBCooker:
1127 taskdata.add_unresolved(localdata, self.status) 1128 taskdata.add_unresolved(localdata, self.status)
1128 1129
1129 rq = bb.runqueue.RunQueue(self, self.configuration.data, self.status, taskdata, runlist) 1130 rq = bb.runqueue.RunQueue(self, self.configuration.data, self.status, taskdata, runlist)
1131 if universe:
1132 rq.rqdata.warn_multi_bb = True
1130 1133
1131 self.server_registration_cb(buildTargetsIdle, rq) 1134 self.server_registration_cb(buildTargetsIdle, rq)
1132 1135
@@ -1180,6 +1183,7 @@ class BBCooker:
1180 pkgs_to_build.append(t) 1183 pkgs_to_build.append(t)
1181 1184
1182 if 'universe' in pkgs_to_build: 1185 if 'universe' in pkgs_to_build:
1186 parselog.warn("The \"universe\" target is only intended for testing and may produce errors.")
1183 parselog.debug(1, "collating packages for \"universe\"") 1187 parselog.debug(1, "collating packages for \"universe\"")
1184 pkgs_to_build.remove('universe') 1188 pkgs_to_build.remove('universe')
1185 for t in self.status.universe_target: 1189 for t in self.status.universe_target:
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
index 7bf432083a..c24841ffcd 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -187,6 +187,7 @@ class RunQueueData:
187 self.taskData = taskData 187 self.taskData = taskData
188 self.targets = targets 188 self.targets = targets
189 self.rq = rq 189 self.rq = rq
190 self.warn_multi_bb = False
190 191
191 self.stampwhitelist = cfgData.getVar("BB_STAMP_WHITELIST", 1) or "" 192 self.stampwhitelist = cfgData.getVar("BB_STAMP_WHITELIST", 1) or ""
192 self.multi_provider_whitelist = (cfgData.getVar("MULTI_PROVIDER_WHITELIST", 1) or "").split() 193 self.multi_provider_whitelist = (cfgData.getVar("MULTI_PROVIDER_WHITELIST", 1) or "").split()
@@ -674,11 +675,14 @@ class RunQueueData:
674 prov_list[prov] = [fn] 675 prov_list[prov] = [fn]
675 elif fn not in prov_list[prov]: 676 elif fn not in prov_list[prov]:
676 prov_list[prov].append(fn) 677 prov_list[prov].append(fn)
677 error = False
678 for prov in prov_list: 678 for prov in prov_list:
679 if len(prov_list[prov]) > 1 and prov not in self.multi_provider_whitelist: 679 if len(prov_list[prov]) > 1 and prov not in self.multi_provider_whitelist:
680 error = True 680 msg = "Multiple .bb files are due to be built which each provide %s (%s)." % (prov, " ".join(prov_list[prov]))
681 logger.error("Multiple .bb files are due to be built which each provide %s (%s).\n This usually means one provides something the other doesn't and should.", prov, " ".join(prov_list[prov])) 681 if self.warn_multi_bb:
682 logger.warn(msg)
683 else:
684 msg += "\n This usually means one provides something the other doesn't and should."
685 logger.error(msg)
682 686
683 687
684 # Create a whitelist usable by the stamp checks 688 # Create a whitelist usable by the stamp checks