]> code.ossystems Code Review - openembedded-core.git/commitdiff
bitbake-dev: Make the task a parameter of the "tryBuild" command
authorRob Bradford <rob@linux.intel.com>
Fri, 24 Oct 2008 15:54:35 +0000 (16:54 +0100)
committerRob Bradford <rob@linux.intel.com>
Mon, 27 Oct 2008 10:19:54 +0000 (10:19 +0000)
And switch the runqueue to use this rather than keeping it in the
self.configuration.cmd variable

bitbake-dev/lib/bb/cooker.py
bitbake-dev/lib/bb/runqueue.py

index 01537ab2f714c77c853a4c47a4435a4885894e3e..5e3cccbdb66f4d5534a2ddf2cb3d90e5a84bb7db 100644 (file)
@@ -195,7 +195,7 @@ class BBCooker:
             bb.msg.error(bb.msg.domain.Build, "%s event exception, aborting" % bb.event.getName(event))
             raise
 
-    def tryBuild(self, fn):
+    def tryBuild(self, fn, task):
         """
         Build a provider and its dependencies. 
         build_depends is a list of previous build dependencies (not runtime)
@@ -209,7 +209,7 @@ class BBCooker:
         #if bb.build.stamp_is_current('do_%s' % self.configuration.cmd, the_data):
         #    return True
 
-        return self.tryBuildPackage(fn, item, self.configuration.cmd, the_data)
+        return self.tryBuildPackage(fn, item, task, the_data)
 
     def showVersions(self):
 
index 16672058293926cf128367847f29dc7800ef7ad8..1c911ef0c8453a572942e7004bc9a6a40b9bde35 100644 (file)
@@ -993,10 +993,9 @@ class RunQueue:
                     os.setpgid(0, 0)
                     newsi = os.open('/dev/null', os.O_RDWR)
                     os.dup2(newsi, sys.stdin.fileno())
-                    self.cooker.configuration.cmd = taskname[3:]
                     bb.data.setVar("__RUNQUEUE_DO_NOT_USE_EXTERNALLY", self, self.cooker.configuration.data)
                     try:
-                        self.cooker.tryBuild(fn)
+                        self.cooker.tryBuild(fn, taskname[3:])
                     except bb.build.EventException:
                         bb.msg.error(bb.msg.domain.Build, "Build of " + fn + " " + taskname + " failed")
                         sys.exit(1)