summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbitbake-dev/bin/bitbake3
-rw-r--r--bitbake-dev/lib/bb/runqueue.py2
-rw-r--r--bitbake-dev/lib/bb/taskdata.py3
-rwxr-xr-xbitbake/bin/bitbake3
-rw-r--r--bitbake/doc/bitbake.13
-rw-r--r--bitbake/lib/bb/cooker.py8
-rw-r--r--bitbake/lib/bb/runqueue.py4
-rw-r--r--bitbake/lib/bb/taskdata.py3
8 files changed, 21 insertions, 8 deletions
diff --git a/bitbake-dev/bin/bitbake b/bitbake-dev/bin/bitbake
index 3e8782597a..920877e4d8 100755
--- a/bitbake-dev/bin/bitbake
+++ b/bitbake-dev/bin/bitbake
@@ -69,6 +69,9 @@ Default BBFILES are the .bb files in the current directory.""" )
69 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.", 69 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.",
70 action = "store_false", dest = "abort", default = True ) 70 action = "store_false", dest = "abort", default = True )
71 71
72 parser.add_option( "-a", "--tryaltconfigs", help = "continue with builds by trying to use alternative providers where possible.",
73 action = "store_true", dest = "tryaltconfigs", default = False )
74
72 parser.add_option( "-f", "--force", help = "force run of specified cmd, regardless of stamp status", 75 parser.add_option( "-f", "--force", help = "force run of specified cmd, regardless of stamp status",
73 action = "store_true", dest = "force", default = False ) 76 action = "store_true", dest = "force", default = False )
74 77
diff --git a/bitbake-dev/lib/bb/runqueue.py b/bitbake-dev/lib/bb/runqueue.py
index 1c911ef0c8..01452d2f33 100644
--- a/bitbake-dev/lib/bb/runqueue.py
+++ b/bitbake-dev/lib/bb/runqueue.py
@@ -869,7 +869,7 @@ class RunQueue:
869 self.finish_runqueue() 869 self.finish_runqueue()
870 870
871 if self.state is runQueueFailed: 871 if self.state is runQueueFailed:
872 if self.taskData.abort: 872 if not self.taskData.tryaltconfigs:
873 raise bb.runqueue.TaskFailure(self.failed_fnids) 873 raise bb.runqueue.TaskFailure(self.failed_fnids)
874 for fnid in self.failed_fnids: 874 for fnid in self.failed_fnids:
875 self.taskData.fail_fnid(fnid) 875 self.taskData.fail_fnid(fnid)
diff --git a/bitbake-dev/lib/bb/taskdata.py b/bitbake-dev/lib/bb/taskdata.py
index 566614ee63..782dfb0b78 100644
--- a/bitbake-dev/lib/bb/taskdata.py
+++ b/bitbake-dev/lib/bb/taskdata.py
@@ -30,7 +30,7 @@ class TaskData:
30 """ 30 """
31 BitBake Task Data implementation 31 BitBake Task Data implementation
32 """ 32 """
33 def __init__(self, abort = True): 33 def __init__(self, abort = True, tryaltconfigs = False):
34 self.build_names_index = [] 34 self.build_names_index = []
35 self.run_names_index = [] 35 self.run_names_index = []
36 self.fn_index = [] 36 self.fn_index = []
@@ -57,6 +57,7 @@ class TaskData:
57 self.failed_fnids = [] 57 self.failed_fnids = []
58 58
59 self.abort = abort 59 self.abort = abort
60 self.tryaltconfigs = tryaltconfigs
60 61
61 def getbuild_id(self, name): 62 def getbuild_id(self, name):
62 """ 63 """
diff --git a/bitbake/bin/bitbake b/bitbake/bin/bitbake
index 9a9b6d3bc6..6a69e340f1 100755
--- a/bitbake/bin/bitbake
+++ b/bitbake/bin/bitbake
@@ -60,6 +60,9 @@ Default BBFILES are the .bb files in the current directory.""" )
60 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.", 60 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.",
61 action = "store_false", dest = "abort", default = True ) 61 action = "store_false", dest = "abort", default = True )
62 62
63 parser.add_option( "-a", "--tryaltconfigs", help = "continue with builds by trying to use alternative providers where possible.",
64 action = "store_true", dest = "tryaltconfigs", default = False )
65
63 parser.add_option( "-f", "--force", help = "force run of specified cmd, regardless of stamp status", 66 parser.add_option( "-f", "--force", help = "force run of specified cmd, regardless of stamp status",
64 action = "store_true", dest = "force", default = False ) 67 action = "store_true", dest = "force", default = False )
65 68
diff --git a/bitbake/doc/bitbake.1 b/bitbake/doc/bitbake.1
index 01172d7412..e687f0a42a 100644
--- a/bitbake/doc/bitbake.1
+++ b/bitbake/doc/bitbake.1
@@ -54,6 +54,9 @@ continue as much as possible after an error. While the target that failed, and
54those that depend on it, cannot be remade, the other dependencies of these 54those that depend on it, cannot be remade, the other dependencies of these
55targets can be processed all the same. 55targets can be processed all the same.
56.TP 56.TP
57.B \-a, \-\-tryaltconfigs
58continue with builds by trying to use alternative providers where possible.
59.TP
57.B \-f, \-\-force 60.B \-f, \-\-force
58force run of specified cmd, regardless of stamp status 61force run of specified cmd, regardless of stamp status
59.TP 62.TP
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index 7477ee6c6f..c5d640da80 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -194,7 +194,7 @@ class BBCooker:
194 bb.data.update_data(localdata) 194 bb.data.update_data(localdata)
195 bb.data.expandKeys(localdata) 195 bb.data.expandKeys(localdata)
196 196
197 taskdata = bb.taskdata.TaskData(self.configuration.abort) 197 taskdata = bb.taskdata.TaskData(self.configuration.abort, self.configuration.tryaltconfigs)
198 198
199 try: 199 try:
200 taskdata.add_provider(localdata, self.status, pkgs_to_build[0]) 200 taskdata.add_provider(localdata, self.status, pkgs_to_build[0])
@@ -243,7 +243,7 @@ class BBCooker:
243 localdata = data.createCopy(self.configuration.data) 243 localdata = data.createCopy(self.configuration.data)
244 bb.data.update_data(localdata) 244 bb.data.update_data(localdata)
245 bb.data.expandKeys(localdata) 245 bb.data.expandKeys(localdata)
246 taskdata = bb.taskdata.TaskData(self.configuration.abort) 246 taskdata = bb.taskdata.TaskData(self.configuration.abort, self.configuration.tryaltconfigs)
247 247
248 runlist = [] 248 runlist = []
249 try: 249 try:
@@ -500,7 +500,7 @@ class BBCooker:
500 bb.build.del_stamp('do_%s' % self.configuration.cmd, self.configuration.data) 500 bb.build.del_stamp('do_%s' % self.configuration.cmd, self.configuration.data)
501 501
502 # Setup taskdata structure 502 # Setup taskdata structure
503 taskdata = bb.taskdata.TaskData(self.configuration.abort) 503 taskdata = bb.taskdata.TaskData(self.configuration.abort, self.configuration.tryaltconfigs)
504 taskdata.add_provider(self.configuration.data, self.status, item) 504 taskdata.add_provider(self.configuration.data, self.status, item)
505 505
506 buildname = bb.data.getVar("BUILDNAME", self.configuration.data) 506 buildname = bb.data.getVar("BUILDNAME", self.configuration.data)
@@ -534,7 +534,7 @@ class BBCooker:
534 bb.data.update_data(localdata) 534 bb.data.update_data(localdata)
535 bb.data.expandKeys(localdata) 535 bb.data.expandKeys(localdata)
536 536
537 taskdata = bb.taskdata.TaskData(self.configuration.abort) 537 taskdata = bb.taskdata.TaskData(self.configuration.abort, self.configuration.tryaltconfigs)
538 538
539 runlist = [] 539 runlist = []
540 try: 540 try:
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
index 62bd10ae24..2df51de75a 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -845,7 +845,7 @@ class RunQueue:
845 failed_fnids = self.finish_runqueue() 845 failed_fnids = self.finish_runqueue()
846 if len(failed_fnids) == 0: 846 if len(failed_fnids) == 0:
847 return failures 847 return failures
848 if self.taskData.abort: 848 if not self.taskData.tryaltconfigs:
849 raise bb.runqueue.TaskFailure(failed_fnids) 849 raise bb.runqueue.TaskFailure(failed_fnids)
850 for fnid in failed_fnids: 850 for fnid in failed_fnids:
851 #print "Failure: %s %s %s" % (fnid, self.taskData.fn_index[fnid], self.runq_task[fnid]) 851 #print "Failure: %s %s %s" % (fnid, self.taskData.fn_index[fnid], self.runq_task[fnid])
@@ -970,6 +970,8 @@ class RunQueue:
970 bb.msg.error(bb.msg.domain.RunQueue, "Task %s (%s) failed" % (task, self.get_user_idstring(task))) 970 bb.msg.error(bb.msg.domain.RunQueue, "Task %s (%s) failed" % (task, self.get_user_idstring(task)))
971 self.failed_fnids.append(self.runq_fnid[task]) 971 self.failed_fnids.append(self.runq_fnid[task])
972 self.stats.taskFailed() 972 self.stats.taskFailed()
973 if not self.taskData.abort:
974 continue
973 break 975 break
974 self.task_complete(task) 976 self.task_complete(task)
975 self.stats.taskCompleted() 977 self.stats.taskCompleted()
diff --git a/bitbake/lib/bb/taskdata.py b/bitbake/lib/bb/taskdata.py
index 566614ee63..782dfb0b78 100644
--- a/bitbake/lib/bb/taskdata.py
+++ b/bitbake/lib/bb/taskdata.py
@@ -30,7 +30,7 @@ class TaskData:
30 """ 30 """
31 BitBake Task Data implementation 31 BitBake Task Data implementation
32 """ 32 """
33 def __init__(self, abort = True): 33 def __init__(self, abort = True, tryaltconfigs = False):
34 self.build_names_index = [] 34 self.build_names_index = []
35 self.run_names_index = [] 35 self.run_names_index = []
36 self.fn_index = [] 36 self.fn_index = []
@@ -57,6 +57,7 @@ class TaskData:
57 self.failed_fnids = [] 57 self.failed_fnids = []
58 58
59 self.abort = abort 59 self.abort = abort
60 self.tryaltconfigs = tryaltconfigs
60 61
61 def getbuild_id(self, name): 62 def getbuild_id(self, name):
62 """ 63 """