summaryrefslogtreecommitdiff
path: root/morphlib/buildcommand.py
diff options
context:
space:
mode:
authorSam Thursfield <sam.thursfield@codethink.co.uk>2014-10-23 15:16:07 +0100
committerSam Thursfield <sam.thursfield@codethink.co.uk>2014-11-10 12:31:03 +0000
commit2a9c29502a76a54aba3cc92c6e617abbe41ba1ee (patch)
tree3232e99d32eb4a7263b84171f4cc18575aa3fa24 /morphlib/buildcommand.py
parent8f47d014bd8946acc67e6fd291a91028ba6c6a08 (diff)
downloadmorph-2a9c29502a76a54aba3cc92c6e617abbe41ba1ee.tar.gz
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.
Diffstat (limited to 'morphlib/buildcommand.py')
-rw-r--r--morphlib/buildcommand.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/morphlib/buildcommand.py b/morphlib/buildcommand.py
index 438badb3..a658fc55 100644
--- a/morphlib/buildcommand.py
+++ b/morphlib/buildcommand.py
@@ -94,10 +94,11 @@ class BuildCommand(object):
'''
self.app.status(msg='Creating source pool', chatty=True)
- srcpool = self.app.create_source_pool(
+ srcpool = morphlib.sourceresolver.create_source_pool(
self.lrc, self.rrc, repo_name, ref, filename,
- original_ref=original_ref)
-
+ original_ref=original_ref,
+ update_repos=not self.app.settings['no-git-update'],
+ status_cb=self.app.status)
return srcpool
def validate_sources(self, srcpool):