diff options
author | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2015-05-13 16:46:34 +0000 |
---|---|---|
committer | Adam Coldrick <adam.coldrick@codethink.co.uk> | 2015-05-14 12:08:52 +0000 |
commit | 1da8ee6f66718de5d5dd413e188425ee4bdcfb47 (patch) | |
tree | fd2aba3c1437818d8012549d3cc025839c293bf1 /morphlib/sourceresolver.py | |
parent | d7e86046706680828b141a21a77ab95419dfb58f (diff) | |
download | morph-1da8ee6f66718de5d5dd413e188425ee4bdcfb47.tar.gz |
Fix prototype of create_source_pool()
This fixes an issue in `morph list-artifacts` and probably other commands:
ERROR: Command failed: morph list-artifacts --quiet file:///ws/master/git.baserock.org/baserock/baserock/definitions HEAD systems/build-system-armv7lhf-jetson.morph systems/weston-system-armv7lhf-jetson.morph systems/genivi-baseline-system-armv7lhf-jetson.morph
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/cliapp/app.py", line 190, in _run
self.process_args(args)
File "/usr/lib/python2.7/site-packages/morphlib/app.py", line 290, in process_args
cliapp.Application.process_args(self, args)
File "/usr/lib/python2.7/site-packages/cliapp/app.py", line 539, in process_args
method(args[1:])
File "/usr/lib/python2.7/site-packages/morphlib/plugins/list_artifacts_plugin.py", line 67, in list_artifacts
repo, ref, system_filename)
File "/usr/lib/python2.7/site-packages/morphlib/plugins/list_artifacts_plugin.py", line 91, in list_artifacts_for_system
status_cb=self.app.status)
File "/usr/lib/python2.7/site-packages/morphlib/sourceresolver.py", line 641, in create_source_pool
definitions_original_ref=original_ref)
File "/usr/lib/python2.7/site-packages/morphlib/sourceresolver.py", line 583, in traverse_morphs
definitions_absref, definitions_tree, visit)
File "/usr/lib/python2.7/site-packages/morphlib/sourceresolver.py", line 408, in _process_definitions_with_children
definitions_queue = collections.deque(system_filenames)
TypeError: 'NoneType' object is not iterable
The issue is that the sourceresolver.create_source_pool() function did
not work correctly if passed a single filename. This was a regression from
commit 4cc75039a78bd8aef9ef464bc0eb6c3ff16809d0.
In order to have a logical function prototype, the create_source_pool()
function now only takes a list of systems, instead of taking either a
single system or a list.
Change-Id: I8f5ec8859a7e26d8107ed1c268fe925818d080a5
Diffstat (limited to 'morphlib/sourceresolver.py')
-rw-r--r-- | morphlib/sourceresolver.py | 6 |
1 files changed, 2 insertions, 4 deletions
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, |