summaryrefslogtreecommitdiffstats
path: root/bitbake/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:41 +0100
commit61fbff2cd43720037de0266b73d5460576ed07e8 (patch)
tree0e8dde7c4d9ec592f7c5f481c73cf2cf85525f5c /bitbake/lib/bb/taskdata.py
parent625a6bf6e813c7b753a9379151c95a4bbc6865c3 (diff)
downloadpoky-61fbff2cd43720037de0266b73d5460576ed07e8.tar.gz
bitbake: 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] (Bitbake rev: 2ca36a9f088438a8d1db44119c704f9480b04298) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/taskdata.py')
-rw-r--r--bitbake/lib/bb/taskdata.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/bitbake/lib/bb/taskdata.py b/bitbake/lib/bb/taskdata.py
index af72a1fb09..ca58e17922 100644
--- a/bitbake/lib/bb/taskdata.py
+++ b/bitbake/lib/bb/taskdata.py
@@ -41,7 +41,7 @@ class TaskData:
41 """ 41 """
42 BitBake Task Data implementation 42 BitBake Task Data implementation
43 """ 43 """
44 def __init__(self, abort = True, tryaltconfigs = False, skiplist = None): 44 def __init__(self, abort = True, tryaltconfigs = False, skiplist = None, allowincomplete = False):
45 self.build_names_index = [] 45 self.build_names_index = []
46 self.run_names_index = [] 46 self.run_names_index = []
47 self.fn_index = [] 47 self.fn_index = []
@@ -70,6 +70,7 @@ class TaskData:
70 70
71 self.abort = abort 71 self.abort = abort
72 self.tryaltconfigs = tryaltconfigs 72 self.tryaltconfigs = tryaltconfigs
73 self.allowincomplete = allowincomplete
73 74
74 self.skiplist = skiplist 75 self.skiplist = skiplist
75 76
@@ -594,9 +595,10 @@ class TaskData:
594 added = added + 1 595 added = added + 1
595 except bb.providers.NoProvider: 596 except bb.providers.NoProvider:
596 targetid = self.getbuild_id(target) 597 targetid = self.getbuild_id(target)
597 if self.abort and targetid in self.external_targets: 598 if self.abort and targetid in self.external_targets and not self.allowincomplete:
598 raise 599 raise
599 self.remove_buildtarget(targetid) 600 if not self.allowincomplete:
601 self.remove_buildtarget(targetid)
600 for target in self.get_unresolved_run_targets(dataCache): 602 for target in self.get_unresolved_run_targets(dataCache):
601 try: 603 try:
602 self.add_rprovider(cfgData, dataCache, target) 604 self.add_rprovider(cfgData, dataCache, target)