summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--morphlib/buildcommand.py12
-rw-r--r--morphlib/plugins/anchor_plugin.py2
-rw-r--r--morphlib/plugins/build_plugin.py2
-rw-r--r--morphlib/plugins/certify_plugin.py2
-rw-r--r--morphlib/plugins/cross-bootstrap_plugin.py3
-rw-r--r--morphlib/plugins/deploy_plugin.py3
-rw-r--r--morphlib/plugins/distbuild_plugin.py4
-rw-r--r--morphlib/plugins/graphing_plugin.py2
-rw-r--r--morphlib/plugins/list_artifacts_plugin.py2
-rw-r--r--morphlib/plugins/show_build_log_plugin.py2
-rw-r--r--morphlib/plugins/show_dependencies_plugin.py2
-rw-r--r--morphlib/plugins/system_manifests_plugin.py2
-rw-r--r--morphlib/sourceresolver.py6
13 files changed, 21 insertions, 23 deletions
diff --git a/morphlib/buildcommand.py b/morphlib/buildcommand.py
index c5d86a08..46c3104f 100644
--- a/morphlib/buildcommand.py
+++ b/morphlib/buildcommand.py
@@ -58,7 +58,7 @@ class BuildCommand(object):
self.app.status(msg='Deciding on task order')
srcpool = self.create_source_pool(
- repo_name, ref, filename, original_ref)
+ repo_name, ref, [filename], original_ref)
self.validate_sources(srcpool)
root_artifact = self.resolve_artifacts(srcpool)
self.build_in_order(root_artifact)
@@ -84,8 +84,8 @@ class BuildCommand(object):
return morphlib.buildenvironment.BuildEnvironment(self.app.settings,
arch)
- def create_source_pool(self, repo_name, ref, filename=None,
- original_ref=None, filenames=None):
+ def create_source_pool(self, repo_name, ref, filenames,
+ original_ref=None):
'''Find the source objects required for building a the given artifact
The SourcePool will contain every stratum and chunk dependency of the
@@ -94,14 +94,12 @@ 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=None,
+ self.lrc, self.rrc, repo_name, ref, filenames,
cachedir=self.app.settings['cachedir'],
original_ref=original_ref,
update_repos=not self.app.settings['no-git-update'],
- status_cb=self.app.status, filenames=filenames)
+ status_cb=self.app.status)
return srcpool
def validate_sources(self, srcpool):
diff --git a/morphlib/plugins/anchor_plugin.py b/morphlib/plugins/anchor_plugin.py
index f3973418..40cd4c48 100644
--- a/morphlib/plugins/anchor_plugin.py
+++ b/morphlib/plugins/anchor_plugin.py
@@ -128,7 +128,7 @@ class AnchorPlugin(cliapp.Plugin):
for system in systems:
bc = BuildCommand(self.app)
srcpool = bc.create_source_pool(branch_repo, branch_ref,
- system)
+ [system])
artifact = bc.resolve_artifacts(srcpool)
sources = set(a.source for a in artifact.walk())
for source in sources:
diff --git a/morphlib/plugins/build_plugin.py b/morphlib/plugins/build_plugin.py
index 8411dcb6..9030799b 100644
--- a/morphlib/plugins/build_plugin.py
+++ b/morphlib/plugins/build_plugin.py
@@ -377,7 +377,7 @@ class BuildPlugin(cliapp.Plugin):
return
self.app.status(msg='Deciding on task order')
- srcpool = bc.create_source_pool(repo, commit, system_filename,
+ srcpool = bc.create_source_pool(repo, commit, [system_filename],
original_ref)
bc.validate_sources(srcpool)
root = bc.resolve_artifacts(srcpool)
diff --git a/morphlib/plugins/certify_plugin.py b/morphlib/plugins/certify_plugin.py
index a44c4e53..8228be4d 100644
--- a/morphlib/plugins/certify_plugin.py
+++ b/morphlib/plugins/certify_plugin.py
@@ -69,7 +69,7 @@ class CertifyPlugin(cliapp.Plugin):
self.app.status(
msg='Creating source pool for %s' % system_filename, chatty=True)
source_pool = morphlib.sourceresolver.create_source_pool(
- self.lrc, self.rrc, repo, ref, system_filename,
+ self.lrc, self.rrc, repo, ref, [system_filename],
cachedir=self.app.settings['cachedir'],
update_repos = not self.app.settings['no-git-update'],
status_cb=self.app.status)
diff --git a/morphlib/plugins/cross-bootstrap_plugin.py b/morphlib/plugins/cross-bootstrap_plugin.py
index eb889645..b8da515e 100644
--- a/morphlib/plugins/cross-bootstrap_plugin.py
+++ b/morphlib/plugins/cross-bootstrap_plugin.py
@@ -255,7 +255,8 @@ class CrossBootstrapPlugin(cliapp.Plugin):
build_command = morphlib.buildcommand.BuildCommand(self.app, build_env)
morph_name = morphlib.util.sanitise_morphology_path(system_name)
- srcpool = build_command.create_source_pool(root_repo, ref, morph_name)
+ srcpool = build_command.create_source_pool(
+ root_repo, ref, [morph_name])
# FIXME: this is a quick fix in order to get it working for
# Baserock 13 release, it is not a reasonable fix
diff --git a/morphlib/plugins/deploy_plugin.py b/morphlib/plugins/deploy_plugin.py
index c8e8959f..b98f3b3c 100644
--- a/morphlib/plugins/deploy_plugin.py
+++ b/morphlib/plugins/deploy_plugin.py
@@ -476,7 +476,8 @@ class DeployPlugin(cliapp.Plugin):
try:
# Find the artifact to build
morph = morphlib.util.sanitise_morphology_path(system['morph'])
- srcpool = build_command.create_source_pool(build_repo, ref, morph)
+ srcpool = build_command.create_source_pool(
+ build_repo, ref, [morph])
artifact = build_command.resolve_artifacts(srcpool)
diff --git a/morphlib/plugins/distbuild_plugin.py b/morphlib/plugins/distbuild_plugin.py
index c5ea5ed6..2d6d932e 100644
--- a/morphlib/plugins/distbuild_plugin.py
+++ b/morphlib/plugins/distbuild_plugin.py
@@ -201,7 +201,7 @@ class CalculateBuildGraphPlugin(cliapp.Plugin):
filename = morphlib.util.sanitise_morphology_path(morph_name)
build_command = morphlib.buildcommand.BuildCommand(self.app)
srcpool = build_command.create_source_pool(
- repo_name, ref, filename, original_ref=original_ref)
+ repo_name, ref, [filename], original_ref=original_ref)
artifact = build_command.resolve_artifacts(srcpool)
self.app.output.write(distbuild.encode_artifact(artifact,
repo_name,
@@ -234,7 +234,7 @@ class WorkerBuild(cliapp.Plugin):
bc = morphlib.buildcommand.BuildCommand(self.app)
source_pool = bc.create_source_pool(artifact_reference.repo,
artifact_reference.ref,
- artifact_reference.root_filename)
+ [artifact_reference.root_filename])
root = bc.resolve_artifacts(source_pool)
diff --git a/morphlib/plugins/graphing_plugin.py b/morphlib/plugins/graphing_plugin.py
index 0db63ffc..68e153fa 100644
--- a/morphlib/plugins/graphing_plugin.py
+++ b/morphlib/plugins/graphing_plugin.py
@@ -64,7 +64,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)
- srcpool = builder.create_source_pool(repo_name, ref, filename)
+ srcpool = builder.create_source_pool(repo_name, ref, [filename])
root_artifact = builder.resolve_artifacts(srcpool)
basename, ext = os.path.splitext(filename)
diff --git a/morphlib/plugins/list_artifacts_plugin.py b/morphlib/plugins/list_artifacts_plugin.py
index b7a5e080..c2e6b459 100644
--- a/morphlib/plugins/list_artifacts_plugin.py
+++ b/morphlib/plugins/list_artifacts_plugin.py
@@ -85,7 +85,7 @@ class ListArtifactsPlugin(cliapp.Plugin):
self.app.status(
msg='Creating source pool for %s' % system_filename, chatty=True)
source_pool = morphlib.sourceresolver.create_source_pool(
- self.lrc, self.rrc, repo, ref, system_filename,
+ self.lrc, self.rrc, repo, ref, [system_filename],
cachedir=self.app.settings['cachedir'],
update_repos = not self.app.settings['no-git-update'],
status_cb=self.app.status)
diff --git a/morphlib/plugins/show_build_log_plugin.py b/morphlib/plugins/show_build_log_plugin.py
index 2c80ff50..a6bb1783 100644
--- a/morphlib/plugins/show_build_log_plugin.py
+++ b/morphlib/plugins/show_build_log_plugin.py
@@ -63,7 +63,7 @@ class ShowBuildLog(cliapp.Plugin):
build_command = morphlib.buildcommand.BuildCommand(self.app, None)
srcpool = build_command.create_source_pool(definitions_repo_path, ref,
- system)
+ [system])
root = build_command.resolve_artifacts(srcpool)
arch = root.source.morphology['arch']
diff --git a/morphlib/plugins/show_dependencies_plugin.py b/morphlib/plugins/show_dependencies_plugin.py
index ee96cb40..42f8f273 100644
--- a/morphlib/plugins/show_dependencies_plugin.py
+++ b/morphlib/plugins/show_dependencies_plugin.py
@@ -68,7 +68,7 @@ class ShowDependenciesPlugin(cliapp.Plugin):
self.app.output.write('dependency graph for %s|%s|%s:\n' %
(repo, ref, morph))
- srcpool = build_command.create_source_pool(repo, ref, filename)
+ srcpool = build_command.create_source_pool(repo, ref, [filename])
root_artifact = build_command.resolve_artifacts(srcpool)
for artifact in reversed(root_artifact.walk()):
diff --git a/morphlib/plugins/system_manifests_plugin.py b/morphlib/plugins/system_manifests_plugin.py
index f5aa25b8..1aea8341 100644
--- a/morphlib/plugins/system_manifests_plugin.py
+++ b/morphlib/plugins/system_manifests_plugin.py
@@ -104,7 +104,7 @@ class SystemManifestsPlugin(cliapp.Plugin):
msg='Creating source pool for %(system)s',
system=system_filename, chatty=True)
source_pool = morphlib.sourceresolver.create_source_pool(
- self.lrc, self.rrc, repo, ref, system_filename,
+ self.lrc, self.rrc, repo, ref, [system_filename],
cachedir=self.app.settings['cachedir'],
update_repos = not self.app.settings['no-git-update'],
status_cb=self.app.status)
diff --git a/morphlib/sourceresolver.py b/morphlib/sourceresolver.py
index b8907bfe..197540b0 100644
--- a/morphlib/sourceresolver.py
+++ b/morphlib/sourceresolver.py
@@ -598,9 +598,9 @@ class SourceResolver(object):
self._resolved_buildsystems)
-def create_source_pool(lrc, rrc, repo, ref, filename, cachedir,
+def create_source_pool(lrc, rrc, repo, ref, filenames, cachedir,
original_ref=None, update_repos=True,
- status_cb=None, filenames=None): # pragma: no cover
+ status_cb=None): # pragma: no cover
'''Find all the sources involved in building a given system.
Given a system morphology, this function will traverse the tree of stratum
@@ -616,8 +616,6 @@ def create_source_pool(lrc, rrc, repo, ref, filename, cachedir,
'''
pool = morphlib.sourcepool.SourcePool()
- if filenames is None and filenames is not None:
- filenames = (filename,)
def add_to_pool(reponame, ref, filename, absref, tree, morphology):
sources = morphlib.source.make_sources(reponame, ref,