summaryrefslogtreecommitdiff
path: root/morphlib/buildcommand.py
diff options
context:
space:
mode:
authorRichard Maw <richard.maw@codethink.co.uk>2015-04-29 20:42:21 +0000
committerRichard Maw <richard.maw@codethink.co.uk>2015-05-11 10:52:50 +0000
commit4cc75039a78bd8aef9ef464bc0eb6c3ff16809d0 (patch)
tree213f7ae9ba02546c00e4d6a2f8825ed037c68938 /morphlib/buildcommand.py
parent43ae0cc28988fb9bf0b0db5daa963ad3a59a1275 (diff)
downloadmorph-4cc75039a78bd8aef9ef464bc0eb6c3ff16809d0.tar.gz
SourceResolver: Allow the resolution of multiple systems
The existing Source resolution code handles resolution of multiple systems sufficiently. It is not appropriate to then take this source pool and attempt to create a build graph from it though, as the logical structure of the input of what we want to build, and the logical structure of what we will produce are conflated in the Source object. If we do not intend to create a build graph from the Source Pool we generate, then it is an appropriate data structure that may be used to analyse changes in the input to a build. Change-Id: If8e4a726f16f8aca000e59ecbbeb7d926cc08391
Diffstat (limited to 'morphlib/buildcommand.py')
-rw-r--r--morphlib/buildcommand.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/morphlib/buildcommand.py b/morphlib/buildcommand.py
index efd10f26..6a5373ab 100644
--- a/morphlib/buildcommand.py
+++ b/morphlib/buildcommand.py
@@ -84,7 +84,8 @@ class BuildCommand(object):
return morphlib.buildenvironment.BuildEnvironment(self.app.settings,
arch)
- def create_source_pool(self, repo_name, ref, filename, original_ref=None):
+ def create_source_pool(self, repo_name, ref, filename=None,
+ original_ref=None, filenames=None):
'''Find the source objects required for building a the given artifact
The SourcePool will contain every stratum and chunk dependency of the
@@ -93,12 +94,14 @@ class BuildCommand(object):
'''
self.app.status(msg='Creating source pool', chatty=True)
+ if filenames is None and filename is not None:
+ filenames = (filename,)
srcpool = morphlib.sourceresolver.create_source_pool(
- self.lrc, self.rrc, repo_name, ref, filename,
+ self.lrc, self.rrc, repo_name, ref, filename=None,
cachedir=self.app.settings['cachedir'],
original_ref=original_ref,
update_repos=not self.app.settings['no-git-update'],
- status_cb=self.app.status)
+ status_cb=self.app.status, filenames=filenames)
return srcpool
def validate_sources(self, srcpool):