]> code.ossystems Code Review - openembedded-core.git/commitdiff
bitbake-dev: Include target/command (from -c) in "buildTargets" command
authorRob Bradford <rob@linux.intel.com>
Fri, 24 Oct 2008 15:22:19 +0000 (16:22 +0100)
committerRob Bradford <rob@linux.intel.com>
Mon, 27 Oct 2008 10:19:54 +0000 (10:19 +0000)
This allows a UI to read / control which task for the given targets is used.
This makes it more consistent with the "buildFile" command.

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

index 0d4ef42569f63c24310bf780d94416e7617aa7a9..5885b375ab6c2dcd0eac5184a18ab63048ffb808 100644 (file)
@@ -155,8 +155,9 @@ class CommandsAsync:
         Build a set of targets
         """
         pkgs_to_build = params[0]
+        task = params[1]
 
-        command.cooker.buildTargets(pkgs_to_build)
+        command.cooker.buildTargets(pkgs_to_build, task)
 
     def generateDepTreeEvent(self, command, params):
         """
index 339bb45ec17ac294bdf77a08d1b2ee2c99b8db63..01537ab2f714c77c853a4c47a4435a4885894e3e 100644 (file)
@@ -151,7 +151,7 @@ class BBCooker:
                 bb.error("Please specify a package name for dependency graph generation.")
         else:
             if self.configuration.pkgs_to_build:
-                self.commandlineAction = ["buildTargets", self.configuration.pkgs_to_build]
+                self.commandlineAction = ["buildTargets", self.configuration.pkgs_to_build, self.configuration.cmd]
             else:
                 self.commandlineAction = None
                 bb.error("Nothing to do.  Use 'bitbake world' to build everything, or run 'bitbake --help' for usage information.")
@@ -677,7 +677,7 @@ class BBCooker:
         self.cookerIdle = False
         self.server.register_idle_function(buildFileIdle, rq)
 
-    def buildTargets(self, targets):
+    def buildTargets(self, targets, task):
         """
         Attempt to build the targets specified
         """
@@ -721,7 +721,7 @@ class BBCooker:
         runlist = []
         for k in targets:
             taskdata.add_provider(localdata, self.status, k)
-            runlist.append([k, "do_%s" % self.configuration.cmd])
+            runlist.append([k, "do_%s" % task])
         taskdata.add_unresolved(localdata, self.status)
 
         rq = bb.runqueue.RunQueue(self, self.configuration.data, self.status, taskdata, runlist)