]> code.ossystems Code Review - openembedded-core.git/commitdiff
bitbake: Add tryaltconfigs option to disable the alternative configuration attempts...
authorRichard Purdie <rpurdie@linux.intel.com>
Tue, 28 Oct 2008 22:15:06 +0000 (22:15 +0000)
committerRichard Purdie <rpurdie@linux.intel.com>
Tue, 28 Oct 2008 22:15:06 +0000 (22:15 +0000)
bitbake-dev/bin/bitbake
bitbake-dev/lib/bb/runqueue.py
bitbake-dev/lib/bb/taskdata.py
bitbake/bin/bitbake
bitbake/doc/bitbake.1
bitbake/lib/bb/cooker.py
bitbake/lib/bb/runqueue.py
bitbake/lib/bb/taskdata.py

index 3e8782597a953d69f202ebf082c85eebbe6be3b9..920877e4d8dc55e16711562856ef60de1598fcd3 100755 (executable)
@@ -69,6 +69,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 1c911ef0c8453a572942e7004bc9a6a40b9bde35..01452d2f3300e19ef8ae862e02ca2359fc6379f7 100644 (file)
@@ -869,7 +869,7 @@ class RunQueue:
             self.finish_runqueue()
 
         if self.state is runQueueFailed:
-            if self.taskData.abort:
+            if not self.taskData.tryaltconfigs:
                 raise bb.runqueue.TaskFailure(self.failed_fnids)
             for fnid in self.failed_fnids:
                 self.taskData.fail_fnid(fnid)
index 566614ee6321472ecf3405dc706376572723684e..782dfb0b7883ef6b70b49fcc803f5df9bb05e375 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):
         """
index 9a9b6d3bc6f758106be516997cc2047b5b732243..6a69e340f1b28f51a1e73e14703b6008c96b45ec 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 01172d7412599c066d9ba51bacebf1dd567ef407..e687f0a42a948a46f4b952182f0157792d8728f9 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 7477ee6c6fac3c21c62d93a86d0755af52ddba18..c5d640da80fe9bff4307e0d1176f883f7896d7f5 100644 (file)
@@ -194,7 +194,7 @@ class BBCooker:
             bb.data.update_data(localdata)
             bb.data.expandKeys(localdata)
 
-            taskdata = bb.taskdata.TaskData(self.configuration.abort)
+            taskdata = bb.taskdata.TaskData(self.configuration.abort, self.configuration.tryaltconfigs)
 
             try:
                 taskdata.add_provider(localdata, self.status, pkgs_to_build[0])
@@ -243,7 +243,7 @@ class BBCooker:
         localdata = data.createCopy(self.configuration.data)
         bb.data.update_data(localdata)
         bb.data.expandKeys(localdata)
-        taskdata = bb.taskdata.TaskData(self.configuration.abort)
+        taskdata = bb.taskdata.TaskData(self.configuration.abort, self.configuration.tryaltconfigs)
 
         runlist = []
         try:
@@ -500,7 +500,7 @@ class BBCooker:
             bb.build.del_stamp('do_%s' % self.configuration.cmd, self.configuration.data)
 
         # Setup taskdata structure
-        taskdata = bb.taskdata.TaskData(self.configuration.abort)
+        taskdata = bb.taskdata.TaskData(self.configuration.abort, self.configuration.tryaltconfigs)
         taskdata.add_provider(self.configuration.data, self.status, item)
 
         buildname = bb.data.getVar("BUILDNAME", self.configuration.data)
@@ -534,7 +534,7 @@ class BBCooker:
         bb.data.update_data(localdata)
         bb.data.expandKeys(localdata)
 
-        taskdata = bb.taskdata.TaskData(self.configuration.abort)
+        taskdata = bb.taskdata.TaskData(self.configuration.abort, self.configuration.tryaltconfigs)
 
         runlist = []
         try:
index 62bd10ae24dd1397759395fe471b3717089757d1..2df51de75a57389d548f97a51831cadb9edba3c3 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 566614ee6321472ecf3405dc706376572723684e..782dfb0b7883ef6b70b49fcc803f5df9bb05e375 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):
         """