summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/runqueue.py
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2007-09-02 14:10:08 +0000
committerRichard Purdie <richard@openedhand.com>2007-09-02 14:10:08 +0000
commite223238b1b88c9b6888972b7944b3854319e4928 (patch)
treeae78533078bd8e7382d50778cec144541eae65f6 /bitbake/lib/bb/runqueue.py
parent1cf731b1e3bb125449c2ef4e1194b6bf69e7b667 (diff)
downloadpoky-e223238b1b88c9b6888972b7944b3854319e4928.tar.gz
bitbake: Update to latest bitbake-1.8 branch
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@2651 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'bitbake/lib/bb/runqueue.py')
-rw-r--r--bitbake/lib/bb/runqueue.py26
1 files changed, 25 insertions, 1 deletions
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
index 3dfae219d2..f245fd6c1d 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -7,7 +7,7 @@ BitBake 'RunQueue' implementation
7Handles preparation and execution of a queue of tasks 7Handles preparation and execution of a queue of tasks
8""" 8"""
9 9
10# Copyright (C) 2006 Richard Purdie 10# Copyright (C) 2006-2007 Richard Purdie
11# 11#
12# This program is free software; you can redistribute it and/or modify 12# This program is free software; you can redistribute it and/or modify
13# it under the terms of the GNU General Public License version 2 as 13# it under the terms of the GNU General Public License version 2 as
@@ -63,6 +63,7 @@ class RunQueue:
63 self.targets = targets 63 self.targets = targets
64 64
65 self.number_tasks = int(bb.data.getVar("BB_NUMBER_THREADS", cfgData) or 1) 65 self.number_tasks = int(bb.data.getVar("BB_NUMBER_THREADS", cfgData) or 1)
66 self.multi_provider_whitelist = (bb.data.getVar("MULTI_PROVIDER_WHITELIST", cfgData) or "").split()
66 67
67 def reset_runqueue(self): 68 def reset_runqueue(self):
68 69
@@ -373,6 +374,29 @@ class RunQueue:
373 if runq_weight1[task] != 0: 374 if runq_weight1[task] != 0:
374 bb.msg.fatal(bb.msg.domain.RunQueue, "Task %s (%s) count not zero!" % (task, self.get_user_idstring(task))) 375 bb.msg.fatal(bb.msg.domain.RunQueue, "Task %s (%s) count not zero!" % (task, self.get_user_idstring(task)))
375 376
377
378 # Check for mulitple taska building the same provider
379 prov_list = {}
380 seen_fn = []
381 for task in range(len(self.runq_fnid)):
382 fn = taskData.fn_index[self.runq_fnid[task]]
383 if fn in seen_fn:
384 continue
385 seen_fn.append(fn)
386 for prov in self.dataCache.fn_provides[fn]:
387 if prov not in prov_list:
388 prov_list[prov] = [fn]
389 elif fn not in prov_list[prov]:
390 prov_list[prov].append(fn)
391 error = False
392 for prov in prov_list:
393 if len(prov_list[prov]) > 1 and prov not in self.multi_provider_whitelist:
394 error = True
395 bb.msg.error(bb.msg.domain.RunQueue, "Multiple files due to be built which all provide %s (%s)" % (prov, " ".join(prov_list[prov])))
396 #if error:
397 # bb.msg.fatal(bb.msg.domain.RunQueue, "Corrupted metadata configuration detected, aborting...")
398
399
376 # Make a weight sorted map 400 # Make a weight sorted map
377 from copy import deepcopy 401 from copy import deepcopy
378 402