diff options
author | Lars Wirzenius <lars.wirzenius@codethink.co.uk> | 2013-02-19 15:59:20 +0000 |
---|---|---|
committer | Lars Wirzenius <lars.wirzenius@codethink.co.uk> | 2013-02-19 17:17:19 +0000 |
commit | 46d42eb7f183ac37c2f1209c3c733fc3bc348e1a (patch) | |
tree | e2f72f54731288b545a28dc7f3e363b38287a92d /morphlib/plugins | |
parent | 24866984ce4c1e2e444ea4aaf2d4860c60ac617f (diff) | |
download | morph-46d42eb7f183ac37c2f1209c3c733fc3bc348e1a.tar.gz |
Replace builder order graph with just a single artifact
The artifact's build dependencies replace the build order graph
from previously.
Diffstat (limited to 'morphlib/plugins')
-rw-r--r-- | morphlib/plugins/deploy_plugin.py | 3 | ||||
-rw-r--r-- | morphlib/plugins/graphing_plugin.py | 30 |
2 files changed, 16 insertions, 17 deletions
diff --git a/morphlib/plugins/deploy_plugin.py b/morphlib/plugins/deploy_plugin.py index 79715e13..f9a345ff 100644 --- a/morphlib/plugins/deploy_plugin.py +++ b/morphlib/plugins/deploy_plugin.py @@ -100,11 +100,10 @@ class DeployPlugin(cliapp.Plugin): # Run the build. build_ref = build_repos[branch_root]['build-ref'] - order = build_command.compute_build_order( + artifact = build_command.get_artifact_object( build_branch_root, build_ref, system_name + '.morph') - artifact = order.groups[-1][-1] if push: self.other.delete_remote_build_refs(build_repos) diff --git a/morphlib/plugins/graphing_plugin.py b/morphlib/plugins/graphing_plugin.py index c719f6e4..8c4ea2ef 100644 --- a/morphlib/plugins/graphing_plugin.py +++ b/morphlib/plugins/graphing_plugin.py @@ -1,4 +1,4 @@ -# Copyright (C) 2012 Codethink Limited +# Copyright (C) 2012, 2013 Codethink Limited # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -37,7 +37,7 @@ class GraphingPlugin(cliapp.Plugin): '%(repo_name)s %(ref)s %(filename)s', repo_name=repo_name, ref=ref, filename=filename) builder = morphlib.buildcommand.BuildCommand(self.app) - order = builder.compute_build_order(repo_name, ref, filename) + artifact = builder.get_artifact_object(repo_name, ref, filename) basename, ext = os.path.splitext(filename) dot_filename = basename + '.gv' @@ -53,17 +53,17 @@ class GraphingPlugin(cliapp.Plugin): with open(dot_filename, 'w') as f: f.write('digraph "%s" {\n' % basename) - for i, group in enumerate(order.groups): - for artifact in group: - f.write( - ' "%s" [shape=%s];\n' % - (artifact.name, - shape_name[artifact.source.morphology['kind']])) - for dep in artifact.dependencies: - if artifact.source.morphology['kind'] == 'stratum': - if dep.dependents == [artifact]: - f.write(dep_fmt % - (artifact.name, dep.name)) - else: - f.write(dep_fmt % (artifact.name, dep.name)) + for a in artifact.walk(): + f.write( + ' "%s" [shape=%s];\n' % + (a.name, + shape_name[a.source.morphology['kind']])) + for dep in a.dependencies: + if a.source.morphology['kind'] == 'stratum': + if dep.dependents == [a]: + f.write(dep_fmt % + (a.name, dep.name)) + else: + f.write(dep_fmt % (a.name, dep.name)) f.write('}\n') + |