diff options
author | Sam Thursfield <sam@afuera.me.uk> | 2014-10-24 16:09:45 +0000 |
---|---|---|
committer | Sam Thursfield <sam@afuera.me.uk> | 2014-10-24 16:33:39 +0000 |
commit | 8df5d7df210f9c712c2377cecc6f3f3a7efce01a (patch) | |
tree | 07bae67a7f210b3713af56d883604e594964eb17 /morphlib/plugins | |
parent | 1d6451363c92ec5466b01b5ba2fd327066343ab4 (diff) | |
download | morph-8df5d7df210f9c712c2377cecc6f3f3a7efce01a.tar.gz |
build: Restructure how BuildCommand.build() is called
Rather than take a list of triplets to build, the BuildCommand.build()
function now takes a single repo/ref/morph triplet. Iterating through
multiple sets of triplets is now done in the build plugin.
There are a couple of cosmetic changes to the status output at the start
and end of a build as a result.
Diffstat (limited to 'morphlib/plugins')
-rw-r--r-- | morphlib/plugins/build_plugin.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/morphlib/plugins/build_plugin.py b/morphlib/plugins/build_plugin.py index 64630c2b..d4f53e2b 100644 --- a/morphlib/plugins/build_plugin.py +++ b/morphlib/plugins/build_plugin.py @@ -56,7 +56,8 @@ class BuildPlugin(cliapp.Plugin): build_command = morphlib.buildcommand.InitiatorBuildCommand( self.app, addr, port) - build_command.build(args) + for repo_name, ref, filename in self.app.itertriplets(args): + build_command.build(repo_name, ref, filename) def distbuild(self, args): '''Distbuild a system image in the current system branch @@ -116,7 +117,8 @@ class BuildPlugin(cliapp.Plugin): self.app.settings['cachedir-min-space']) build_command = morphlib.buildcommand.BuildCommand(self.app) - build_command.build(args) + for repo_name, ref, filename in self.app.itertriplets(args): + build_command.build(repo_name, ref, filename) def build(self, args): '''Build a system image in the current system branch @@ -190,4 +192,4 @@ class BuildPlugin(cliapp.Plugin): name=name, email=email, build_uuid=build_uuid, status=self.app.status) with pbb as (repo, ref): - build_command.build([repo, ref, system_filename]) + build_command.build(repo, ref, system_filename) |