Add tryaltconfigs option to control whether bitbake trys using alternative providers...
authorRichard Purdie <rpurdie@linux.intel.com>
Sat, 6 Dec 2008 11:50:02 +0000 (11:50 +0000)
committerRichard Purdie <rpurdie@linux.intel.com>
Sat, 6 Dec 2008 11:50:02 +0000 (11:50 +0000)
ChangeLog
bin/bitbake
doc/bitbake.1
lib/bb/runqueue.py
lib/bb/taskdata.py

index b260bca..a94f1be 100644 (file)
--- 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.
index dc35152..0087be3 100755 (executable)
@@ -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 )
 
index 01172d7..e687f0a 100644 (file)
@@ -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
index 62bd10a..2df51de 100644 (file)
@@ -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()
index 7569486..64ab032 100644 (file)
@@ -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):
         """