mirror of
https://git.yoctoproject.org/poky
synced 2026-09-19 09:49:33 +02:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
0aedc60b02
commit
5210cc40db
@@ -1084,6 +1084,7 @@ class BBCooker:
|
|||||||
if (task == None):
|
if (task == None):
|
||||||
task = self.configuration.cmd
|
task = self.configuration.cmd
|
||||||
|
|
||||||
|
universe = ('universe' in targets)
|
||||||
targets = self.checkPackages(targets)
|
targets = self.checkPackages(targets)
|
||||||
|
|
||||||
def buildTargetsIdle(server, rq, abort):
|
def buildTargetsIdle(server, rq, abort):
|
||||||
@@ -1127,6 +1128,8 @@ class BBCooker:
|
|||||||
taskdata.add_unresolved(localdata, self.status)
|
taskdata.add_unresolved(localdata, self.status)
|
||||||
|
|
||||||
rq = bb.runqueue.RunQueue(self, self.configuration.data, self.status, taskdata, runlist)
|
rq = bb.runqueue.RunQueue(self, self.configuration.data, self.status, taskdata, runlist)
|
||||||
|
if universe:
|
||||||
|
rq.rqdata.warn_multi_bb = True
|
||||||
|
|
||||||
self.server_registration_cb(buildTargetsIdle, rq)
|
self.server_registration_cb(buildTargetsIdle, rq)
|
||||||
|
|
||||||
@@ -1180,6 +1183,7 @@ class BBCooker:
|
|||||||
pkgs_to_build.append(t)
|
pkgs_to_build.append(t)
|
||||||
|
|
||||||
if 'universe' in pkgs_to_build:
|
if 'universe' in pkgs_to_build:
|
||||||
|
parselog.warn("The \"universe\" target is only intended for testing and may produce errors.")
|
||||||
parselog.debug(1, "collating packages for \"universe\"")
|
parselog.debug(1, "collating packages for \"universe\"")
|
||||||
pkgs_to_build.remove('universe')
|
pkgs_to_build.remove('universe')
|
||||||
for t in self.status.universe_target:
|
for t in self.status.universe_target:
|
||||||
|
|||||||
@@ -187,6 +187,7 @@ class RunQueueData:
|
|||||||
self.taskData = taskData
|
self.taskData = taskData
|
||||||
self.targets = targets
|
self.targets = targets
|
||||||
self.rq = rq
|
self.rq = rq
|
||||||
|
self.warn_multi_bb = False
|
||||||
|
|
||||||
self.stampwhitelist = cfgData.getVar("BB_STAMP_WHITELIST", 1) or ""
|
self.stampwhitelist = cfgData.getVar("BB_STAMP_WHITELIST", 1) or ""
|
||||||
self.multi_provider_whitelist = (cfgData.getVar("MULTI_PROVIDER_WHITELIST", 1) or "").split()
|
self.multi_provider_whitelist = (cfgData.getVar("MULTI_PROVIDER_WHITELIST", 1) or "").split()
|
||||||
@@ -674,11 +675,14 @@ class RunQueueData:
|
|||||||
prov_list[prov] = [fn]
|
prov_list[prov] = [fn]
|
||||||
elif fn not in prov_list[prov]:
|
elif fn not in prov_list[prov]:
|
||||||
prov_list[prov].append(fn)
|
prov_list[prov].append(fn)
|
||||||
error = False
|
|
||||||
for prov in prov_list:
|
for prov in prov_list:
|
||||||
if len(prov_list[prov]) > 1 and prov not in self.multi_provider_whitelist:
|
if len(prov_list[prov]) > 1 and prov not in self.multi_provider_whitelist:
|
||||||
error = True
|
msg = "Multiple .bb files are due to be built which each provide %s (%s)." % (prov, " ".join(prov_list[prov]))
|
||||||
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]))
|
if self.warn_multi_bb:
|
||||||
|
logger.warn(msg)
|
||||||
|
else:
|
||||||
|
msg += "\n This usually means one provides something the other doesn't and should."
|
||||||
|
logger.error(msg)
|
||||||
|
|
||||||
|
|
||||||
# Create a whitelist usable by the stamp checks
|
# Create a whitelist usable by the stamp checks
|
||||||
|
|||||||
Reference in New Issue
Block a user