aboutsummaryrefslogtreecommitdiffstats
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)
downloadopenembedded-core-contrib-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:
Generate an event containing the dependency information
"""
pkgs_to_build = params[0]
+ task = params[1]
- command.cooker.generateDepTreeEvent(pkgs_to_build)
+ command.cooker.generateDepTreeEvent(pkgs_to_build, task)
command.finishAsyncCommand()
def generateDotGraph(self, command, params):
@@ -173,8 +174,9 @@ class CommandsAsync:
Dump dependency information to disk as .dot files
"""
pkgs_to_build = params[0]
+ task = params[1]
- command.cooker.generateDotGraphFiles(pkgs_to_build)
+ command.cooker.generateDotGraphFiles(pkgs_to_build, task)
command.finishAsyncCommand()
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:
self.commandlineAction = ["parseFiles"]
elif self.configuration.dot_graph:
if self.configuration.pkgs_to_build:
- self.commandlineAction = ["generateDotGraph", self.configuration.pkgs_to_build]
+ self.commandlineAction = ["generateDotGraph", self.configuration.pkgs_to_build, self.configuration.cmd]
else:
self.commandlineAction = None
bb.error("Please specify a package name for dependency graph generation.")
@@ -302,7 +302,7 @@ class BBCooker:
if data.getVarFlag( e, 'python', envdata ):
bb.msg.plain("\npython %s () {\n%s}\n" % (e, data.getVar(e, envdata, 1)))
- def generateDepTreeData(self, pkgs_to_build):
+ def generateDepTreeData(self, pkgs_to_build, task):
"""
Create a dependency tree of pkgs_to_build, returning the data.
"""
@@ -320,7 +320,7 @@ class BBCooker:
runlist = []
for k in pkgs_to_build:
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)
@@ -390,21 +390,21 @@ class BBCooker:
return depend_tree
- def generateDepTreeEvent(self, pkgs_to_build):
+ def generateDepTreeEvent(self, pkgs_to_build, task):
"""
Create a task dependency graph of pkgs_to_build.
Generate an event with the result
"""
- depgraph = self.generateDepTreeData(pkgs_to_build)
+ depgraph = self.generateDepTreeData(pkgs_to_build, task)
bb.event.fire(bb.event.DepTreeGenerated(self.configuration.data, depgraph))
- def generateDotGraphFiles(self, pkgs_to_build):
+ def generateDotGraphFiles(self, pkgs_to_build, task):
"""
Create a task dependency graph of pkgs_to_build.
Save the result to a set of .dot files.
"""
- depgraph = self.generateDepTreeData(pkgs_to_build)
+ depgraph = self.generateDepTreeData(pkgs_to_build, task)
# Prints a flattened form of package-depends below where subpackages of a package are merged into the main pn
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):
if not cmdline or cmdline[0] != "generateDotGraph":
print "This UI is only compatible with the -g option"
return
- ret = server.runCommand(["generateDepTreeEvent", cmdline[1]])
+ ret = server.runCommand(["generateDepTreeEvent", cmdline[1], cmdline[2]])
if ret != True:
print "Couldn't run command! %s" % ret
return