From 09d6a4054ef989fe487ada50edadf46f30c5e5e4 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Sat, 6 Dec 2008 11:50:02 +0000 Subject: [PATCH] Add tryaltconfigs option to control whether bitbake trys using alternative providers to fulfil failed dependencies. It defaults to off, changing the default since this behaviour confuses many users and isn't often useful (from Poky). --- ChangeLog | 3 +++ bin/bitbake | 3 +++ doc/bitbake.1 | 3 +++ lib/bb/runqueue.py | 4 +++- lib/bb/taskdata.py | 3 ++- 5 files changed, 14 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index b260bca..a94f1be 100644 --- a/ChangeLog +++ b/ChangeLog @@ -63,6 +63,9 @@ Changes in BitBake 1.8.x: - use @rev when doing a svn checkout - Add osc fetcher (from Joshua Lock in Poky) - When SRCREV autorevisioning for a recipe is in use, don't cache the recipe + - Add tryaltconfigs option to control whether bitbake trys using alternative providers + to fulfil failed dependencies. It defaults to off, changing the default since this + behaviour confuses many users and isn't often useful. Changes in BitBake 1.8.10: - Psyco is available only for x86 - do not use it on other architectures. diff --git a/bin/bitbake b/bin/bitbake index dc35152..0087be3 100755 --- a/bin/bitbake +++ b/bin/bitbake @@ -60,6 +60,9 @@ Default BBFILES are the .bb files in the current directory.""" ) parser.add_option( "-k", "--continue", help = "continue as much as possible after an error. While the target that failed, and those that depend on it, cannot be remade, the other dependencies of these targets can be processed all the same.", action = "store_false", dest = "abort", default = True ) + parser.add_option( "-a", "--tryaltconfigs", help = "continue with builds by trying to use alternative providers where possible.", + action = "store_true", dest = "tryaltconfigs", default = False ) + parser.add_option( "-f", "--force", help = "force run of specified cmd, regardless of stamp status", action = "store_true", dest = "force", default = False ) diff --git a/doc/bitbake.1 b/doc/bitbake.1 index 01172d7..e687f0a 100644 --- a/doc/bitbake.1 +++ b/doc/bitbake.1 @@ -54,6 +54,9 @@ continue as much as possible after an error. While the target that failed, and those that depend on it, cannot be remade, the other dependencies of these targets can be processed all the same. .TP +.B \-a, \-\-tryaltconfigs +continue with builds by trying to use alternative providers where possible. +.TP .B \-f, \-\-force force run of specified cmd, regardless of stamp status .TP diff --git a/lib/bb/runqueue.py b/lib/bb/runqueue.py index 62bd10a..2df51de 100644 --- a/lib/bb/runqueue.py +++ b/lib/bb/runqueue.py @@ -845,7 +845,7 @@ class RunQueue: failed_fnids = self.finish_runqueue() if len(failed_fnids) == 0: return failures - if self.taskData.abort: + if not self.taskData.tryaltconfigs: raise bb.runqueue.TaskFailure(failed_fnids) for fnid in failed_fnids: #print "Failure: %s %s %s" % (fnid, self.taskData.fn_index[fnid], self.runq_task[fnid]) @@ -970,6 +970,8 @@ class RunQueue: bb.msg.error(bb.msg.domain.RunQueue, "Task %s (%s) failed" % (task, self.get_user_idstring(task))) self.failed_fnids.append(self.runq_fnid[task]) self.stats.taskFailed() + if not self.taskData.abort: + continue break self.task_complete(task) self.stats.taskCompleted() diff --git a/lib/bb/taskdata.py b/lib/bb/taskdata.py index 7569486..64ab032 100644 --- a/lib/bb/taskdata.py +++ b/lib/bb/taskdata.py @@ -30,7 +30,7 @@ class TaskData: """ BitBake Task Data implementation """ - def __init__(self, abort = True): + def __init__(self, abort = True, tryaltconfigs = False): self.build_names_index = [] self.run_names_index = [] self.fn_index = [] @@ -57,6 +57,7 @@ class TaskData: self.failed_fnids = [] self.abort = abort + self.tryaltconfigs = tryaltconfigs def getbuild_id(self, name): """ -- 2.7.4