aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bb/taskdata.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2015-07-10 14:05:06 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-07-12 22:50:26 +0100
commit2ca36a9f088438a8d1db44119c704f9480b04298 (patch)
tree9e54192750b32d567340ce23c359adb29425a72a /lib/bb/taskdata.py
parent21dce82056887d8d28edde61b1b82f78bdf7613c (diff)
downloadbitbake-2ca36a9f088438a8d1db44119c704f9480b04298.tar.gz
cooker/taskdata: Make NoProvider errors non-fatal to -e/-g options
If you have a situation where you are getting a "Nothing PROVIDES" error (for example when something you request to build DEPENDS on something that has been skipped or doesn't exist) it would be useful to be able to use bitbake -g or bitbake -e to debug it, but currently both of those are blocked by the error. This patch adds an "allowincomplete" option to taskdata and uses this for the -e/-g bitbake options. The NoProvider errors are still printed and bitbake does return an error exist code but the environment and task graph files are generated. [YOCTO #7623] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/taskdata.py')
-rw-r--r--lib/bb/taskdata.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/bb/taskdata.py b/lib/bb/taskdata.py
index af72a1fb0..ca58e1792 100644
--- a/lib/bb/taskdata.py
+++ b/lib/bb/taskdata.py
@@ -41,7 +41,7 @@ class TaskData:
"""
BitBake Task Data implementation
"""
- def __init__(self, abort = True, tryaltconfigs = False, skiplist = None):
+ def __init__(self, abort = True, tryaltconfigs = False, skiplist = None, allowincomplete = False):
self.build_names_index = []
self.run_names_index = []
self.fn_index = []
@@ -70,6 +70,7 @@ class TaskData:
self.abort = abort
self.tryaltconfigs = tryaltconfigs
+ self.allowincomplete = allowincomplete
self.skiplist = skiplist
@@ -594,9 +595,10 @@ class TaskData:
added = added + 1
except bb.providers.NoProvider:
targetid = self.getbuild_id(target)
- if self.abort and targetid in self.external_targets:
+ if self.abort and targetid in self.external_targets and not self.allowincomplete:
raise
- self.remove_buildtarget(targetid)
+ if not self.allowincomplete:
+ self.remove_buildtarget(targetid)
for target in self.get_unresolved_run_targets(dataCache):
try:
self.add_rprovider(cfgData, dataCache, target)