summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/cooker.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/cooker.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/cooker.py')
-rw-r--r--bitbake/lib/bb/cooker.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index 58137f6d62..46e5560e83 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -581,7 +581,7 @@ class BBCooker:
581 if pkgs_to_build[0] in set(ignore.split()): 581 if pkgs_to_build[0] in set(ignore.split()):
582 bb.fatal("%s is in ASSUME_PROVIDED" % pkgs_to_build[0]) 582 bb.fatal("%s is in ASSUME_PROVIDED" % pkgs_to_build[0])
583 583
584 taskdata, runlist, pkgs_to_build = self.buildTaskData(pkgs_to_build, None, self.configuration.abort) 584 taskdata, runlist, pkgs_to_build = self.buildTaskData(pkgs_to_build, None, self.configuration.abort, allowincomplete=True)
585 585
586 targetid = taskdata.getbuild_id(pkgs_to_build[0]) 586 targetid = taskdata.getbuild_id(pkgs_to_build[0])
587 fnid = taskdata.build_targets[targetid][0] 587 fnid = taskdata.build_targets[targetid][0]
@@ -614,7 +614,7 @@ class BBCooker:
614 logger.plain("\npython %s () {\n%s}\n", e, envdata.getVar(e, True)) 614 logger.plain("\npython %s () {\n%s}\n", e, envdata.getVar(e, True))
615 615
616 616
617 def buildTaskData(self, pkgs_to_build, task, abort): 617 def buildTaskData(self, pkgs_to_build, task, abort, allowincomplete=False):
618 """ 618 """
619 Prepare a runqueue and taskdata object for iteration over pkgs_to_build 619 Prepare a runqueue and taskdata object for iteration over pkgs_to_build
620 """ 620 """
@@ -629,7 +629,7 @@ class BBCooker:
629 localdata = data.createCopy(self.data) 629 localdata = data.createCopy(self.data)
630 bb.data.update_data(localdata) 630 bb.data.update_data(localdata)
631 bb.data.expandKeys(localdata) 631 bb.data.expandKeys(localdata)
632 taskdata = bb.taskdata.TaskData(abort, skiplist=self.skiplist) 632 taskdata = bb.taskdata.TaskData(abort, skiplist=self.skiplist, allowincomplete=allowincomplete)
633 633
634 current = 0 634 current = 0
635 runlist = [] 635 runlist = []
@@ -654,7 +654,7 @@ class BBCooker:
654 654
655 # We set abort to False here to prevent unbuildable targets raising 655 # We set abort to False here to prevent unbuildable targets raising
656 # an exception when we're just generating data 656 # an exception when we're just generating data
657 taskdata, runlist, pkgs_to_build = self.buildTaskData(pkgs_to_build, task, False) 657 taskdata, runlist, pkgs_to_build = self.buildTaskData(pkgs_to_build, task, False, allowincomplete=True)
658 658
659 return runlist, taskdata 659 return runlist, taskdata
660 660