From 2a9c29502a76a54aba3cc92c6e617abbe41ba1ee Mon Sep 17 00:00:00 2001 From: Sam Thursfield Date: Thu, 23 Oct 2014 15:16:07 +0100 Subject: Move create_source_pool code into new 'sourceresolver' module This code is an essential part of 'morph build'. It's quite complex and really shouldn't be mixed in with the base Application class. Given a dedicated class we can store some state in the object and avoid functions with seven parameters, too. --- morphlib/plugins/list_artifacts_plugin.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'morphlib/plugins') diff --git a/morphlib/plugins/list_artifacts_plugin.py b/morphlib/plugins/list_artifacts_plugin.py index 0f14a579..713473ac 100644 --- a/morphlib/plugins/list_artifacts_plugin.py +++ b/morphlib/plugins/list_artifacts_plugin.py @@ -84,8 +84,10 @@ class ListArtifactsPlugin(cliapp.Plugin): self.app.status( msg='Creating source pool for %s' % system_filename, chatty=True) - source_pool = self.app.create_source_pool( - self.lrc, self.rrc, repo, ref, system_filename) + source_pool = morphlib.SourceResolver.create_source_pool( + self.lrc, self.rrc, repo, ref, system_filename, + update_repos = not self.app.settings['no-git-update'], + status_cb=self.app.status) self.app.status( msg='Resolving artifacts for %s' % system_filename, chatty=True) -- cgit v1.2.1