summaryrefslogtreecommitdiffstats
path: root/bitbake-dev
diff options
context:
space:
mode:
authorRob Bradford <rob@linux.intel.com>2008-10-24 17:22:20 +0100
committerRob Bradford <rob@linux.intel.com>2008-10-27 10:19:54 +0000
commit790ed683565e56ef513bad568de1b15d801bfe7b (patch)
tree04bbd39860cc5d6e8267b8c7f587b1e0f91d4267 /bitbake-dev
parent22a326547dfd80b585fa7e4ecedcdb25d54a5a86 (diff)
downloadpoky-790ed683565e56ef513bad568de1b15d801bfe7b.tar.gz
bitbake-dev: Remove implicit task from generateDepTree/generateDotGraphFiles
Remove the implicit (from configuration.cmd) command/task for these events and instead use a parameter so that the task is given explicitly.
Diffstat (limited to 'bitbake-dev')
-rw-r--r--bitbake-dev/lib/bb/command.py6
-rw-r--r--bitbake-dev/lib/bb/cooker.py14
-rw-r--r--bitbake-dev/lib/bb/ui/depexplorer.py2
3 files changed, 12 insertions, 10 deletions
diff --git a/bitbake-dev/lib/bb/command.py b/bitbake-dev/lib/bb/command.py
index 5885b375ab..b94756649b 100644
--- a/bitbake-dev/lib/bb/command.py
+++ b/bitbake-dev/lib/bb/command.py
@@ -164,8 +164,9 @@ class CommandsAsync:
164 Generate an event containing the dependency information 164 Generate an event containing the dependency information
165 """ 165 """
166 pkgs_to_build = params[0] 166 pkgs_to_build = params[0]
167 task = params[1]
167 168
168 command.cooker.generateDepTreeEvent(pkgs_to_build) 169 command.cooker.generateDepTreeEvent(pkgs_to_build, task)
169 command.finishAsyncCommand() 170 command.finishAsyncCommand()
170 171
171 def generateDotGraph(self, command, params): 172 def generateDotGraph(self, command, params):
@@ -173,8 +174,9 @@ class CommandsAsync:
173 Dump dependency information to disk as .dot files 174 Dump dependency information to disk as .dot files
174 """ 175 """
175 pkgs_to_build = params[0] 176 pkgs_to_build = params[0]
177 task = params[1]
176 178
177 command.cooker.generateDotGraphFiles(pkgs_to_build) 179 command.cooker.generateDotGraphFiles(pkgs_to_build, task)
178 command.finishAsyncCommand() 180 command.finishAsyncCommand()
179 181
180 def showVersions(self, command, params): 182 def showVersions(self, command, params):
diff --git a/bitbake-dev/lib/bb/cooker.py b/bitbake-dev/lib/bb/cooker.py
index 0fed1ba842..c9afadbc97 100644
--- a/bitbake-dev/lib/bb/cooker.py
+++ b/bitbake-dev/lib/bb/cooker.py
@@ -145,7 +145,7 @@ class BBCooker:
145 self.commandlineAction = ["parseFiles"] 145 self.commandlineAction = ["parseFiles"]
146 elif self.configuration.dot_graph: 146 elif self.configuration.dot_graph:
147 if self.configuration.pkgs_to_build: 147 if self.configuration.pkgs_to_build:
148 self.commandlineAction = ["generateDotGraph", self.configuration.pkgs_to_build] 148 self.commandlineAction = ["generateDotGraph", self.configuration.pkgs_to_build, self.configuration.cmd]
149 else: 149 else:
150 self.commandlineAction = None 150 self.commandlineAction = None
151 bb.error("Please specify a package name for dependency graph generation.") 151 bb.error("Please specify a package name for dependency graph generation.")
@@ -302,7 +302,7 @@ class BBCooker:
302 if data.getVarFlag( e, 'python', envdata ): 302 if data.getVarFlag( e, 'python', envdata ):
303 bb.msg.plain("\npython %s () {\n%s}\n" % (e, data.getVar(e, envdata, 1))) 303 bb.msg.plain("\npython %s () {\n%s}\n" % (e, data.getVar(e, envdata, 1)))
304 304
305 def generateDepTreeData(self, pkgs_to_build): 305 def generateDepTreeData(self, pkgs_to_build, task):
306 """ 306 """
307 Create a dependency tree of pkgs_to_build, returning the data. 307 Create a dependency tree of pkgs_to_build, returning the data.
308 """ 308 """
@@ -320,7 +320,7 @@ class BBCooker:
320 runlist = [] 320 runlist = []
321 for k in pkgs_to_build: 321 for k in pkgs_to_build:
322 taskdata.add_provider(localdata, self.status, k) 322 taskdata.add_provider(localdata, self.status, k)
323 runlist.append([k, "do_%s" % self.configuration.cmd]) 323 runlist.append([k, "do_%s" % task])
324 taskdata.add_unresolved(localdata, self.status) 324 taskdata.add_unresolved(localdata, self.status)
325 325
326 rq = bb.runqueue.RunQueue(self, self.configuration.data, self.status, taskdata, runlist) 326 rq = bb.runqueue.RunQueue(self, self.configuration.data, self.status, taskdata, runlist)
@@ -390,21 +390,21 @@ class BBCooker:
390 return depend_tree 390 return depend_tree
391 391
392 392
393 def generateDepTreeEvent(self, pkgs_to_build): 393 def generateDepTreeEvent(self, pkgs_to_build, task):
394 """ 394 """
395 Create a task dependency graph of pkgs_to_build. 395 Create a task dependency graph of pkgs_to_build.
396 Generate an event with the result 396 Generate an event with the result
397 """ 397 """
398 depgraph = self.generateDepTreeData(pkgs_to_build) 398 depgraph = self.generateDepTreeData(pkgs_to_build, task)
399 bb.event.fire(bb.event.DepTreeGenerated(self.configuration.data, depgraph)) 399 bb.event.fire(bb.event.DepTreeGenerated(self.configuration.data, depgraph))
400 400
401 def generateDotGraphFiles(self, pkgs_to_build): 401 def generateDotGraphFiles(self, pkgs_to_build, task):
402 """ 402 """
403 Create a task dependency graph of pkgs_to_build. 403 Create a task dependency graph of pkgs_to_build.
404 Save the result to a set of .dot files. 404 Save the result to a set of .dot files.
405 """ 405 """
406 406
407 depgraph = self.generateDepTreeData(pkgs_to_build) 407 depgraph = self.generateDepTreeData(pkgs_to_build, task)
408 408
409 # Prints a flattened form of package-depends below where subpackages of a package are merged into the main pn 409 # Prints a flattened form of package-depends below where subpackages of a package are merged into the main pn
410 depends_file = file('pn-depends.dot', 'w' ) 410 depends_file = file('pn-depends.dot', 'w' )
diff --git a/bitbake-dev/lib/bb/ui/depexplorer.py b/bitbake-dev/lib/bb/ui/depexplorer.py
index becbb5dd5d..9d92fa0a08 100644
--- a/bitbake-dev/lib/bb/ui/depexplorer.py
+++ b/bitbake-dev/lib/bb/ui/depexplorer.py
@@ -202,7 +202,7 @@ def init(server, eventHandler):
202 if not cmdline or cmdline[0] != "generateDotGraph": 202 if not cmdline or cmdline[0] != "generateDotGraph":
203 print "This UI is only compatible with the -g option" 203 print "This UI is only compatible with the -g option"
204 return 204 return
205 ret = server.runCommand(["generateDepTreeEvent", cmdline[1]]) 205 ret = server.runCommand(["generateDepTreeEvent", cmdline[1], cmdline[2]])
206 if ret != True: 206 if ret != True:
207 print "Couldn't run command! %s" % ret 207 print "Couldn't run command! %s" % ret
208 return 208 return