From 90f6132cfbc314957dfca1228ec73d6e5695ef2a Mon Sep 17 00:00:00 2001 From: Richard Maw Date: Fri, 10 Oct 2014 14:04:25 +0100 Subject: Remove queueing --- morphlib/artifactresolver.py | 22 ++++++---------------- morphlib/util.py | 2 +- 2 files changed, 7 insertions(+), 17 deletions(-) diff --git a/morphlib/artifactresolver.py b/morphlib/artifactresolver.py index 8c8b37d0..168c122c 100644 --- a/morphlib/artifactresolver.py +++ b/morphlib/artifactresolver.py @@ -82,7 +82,7 @@ class ArtifactResolver(object): self._added_artifacts.add(system) resolved_artifacts = self._resolve_system_dependencies( - systems, source, queue) + systems, source) for artifact in resolved_artifacts: if not artifact in self._added_artifacts: @@ -105,7 +105,7 @@ class ArtifactResolver(object): self._added_artifacts.add(stratum) resolved_artifacts = self._resolve_stratum_dependencies( - strata, source, queue) + strata, source) for artifact in resolved_artifacts: if not artifact in self._added_artifacts: @@ -126,15 +126,9 @@ class ArtifactResolver(object): return artifacts def _create_initial_queue(self): - if all([x.morphology['kind'] == 'chunk' for x in self._source_pool]): - return collections.deque(self._source_pool) - else: - sources = [x for x in self._source_pool - if x.morphology['kind'] != 'chunk'] - return collections.deque(sources) - - def _resolve_system_dependencies(self, systems, - source, queue): # pragma: no cover + return collections.deque(self._source_pool) + + def _resolve_system_dependencies(self, systems, source): # pragma: no cover artifacts = [] for info in source.morphology['strata']: @@ -156,11 +150,9 @@ class ArtifactResolver(object): source.add_dependency(stratum_artifact) artifacts.append(stratum_artifact) - queue.append(stratum_source) - return artifacts - def _resolve_stratum_dependencies(self, strata, source, queue): + def _resolve_stratum_dependencies(self, strata, source): artifacts = [] stratum_build_depends = [] @@ -191,8 +183,6 @@ class ArtifactResolver(object): source.add_dependency(other_stratum) - queue.append(other_source) - # 'name' here is the chunk artifact name name_to_processed_artifacts = {} diff --git a/morphlib/util.py b/morphlib/util.py index cc8ce88d..d5b0bce7 100644 --- a/morphlib/util.py +++ b/morphlib/util.py @@ -187,7 +187,7 @@ def combine_aliases(app): # pragma: no cover elif '=' not in trove_id and trove_id not in alias_map: alias_map[trove_id] = "%s=%s#%s" % ( trove_id, - _expand('ssh', trove_id), + _expand('git', trove_id), _expand('ssh', trove_id)) for repo_alias in repo_aliases: m = re.match(repo_pat, repo_alias) -- cgit v1.2.1