summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2017-01-16 14:40:24 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-01-19 15:18:34 +0000
commit438986f4e39974930ee3205ca4c4d620090e57bb (patch)
tree30c2d4ceb587ade7f70fd13d64121ef4711f5a32
parent1559ad1fc3ae8b1e4e75b210f598b90be192571b (diff)
downloadopenembedded-core-contrib-438986f4e39974930ee3205ca4c4d620090e57bb.tar.gz
cooker: Only add universe targets where the task exists
Currently "bitbake universe -c fetch" will error if every task in the system doesn't have a fetch task. This seems unreasonable so filter the list based upon whether the task exists. This implementation does assume if a task exits for a given provider name, it can run, even if the preferred provider that ends up getting built might be the namespace without the task. This is unlikely to be a real world issue at this point. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--lib/bb/cooker.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/bb/cooker.py b/lib/bb/cooker.py
index 5608845611..a7b9745e89 100644
--- a/lib/bb/cooker.py
+++ b/lib/bb/cooker.py
@@ -1704,6 +1704,15 @@ class BBCooker:
pkgs_to_build.remove('universe')
for mc in self.multiconfigs:
for t in self.recipecaches[mc].universe_target:
+ if task:
+ foundtask = False
+ for provider_fn in self.recipecaches[mc].providers[t]:
+ if task in self.recipecaches[mc].task_deps[provider_fn]['tasks']:
+ foundtask = True
+ break
+ if not foundtask:
+ bb.debug(1, "Skipping %s for universe tasks as task %s doesn't exist" % (t, task))
+ continue
if mc:
t = "multiconfig:" + mc + ":" + t
pkgs_to_build.append(t)