summaryrefslogtreecommitdiff
path: root/morphlib/sourceresolver.py
diff options
context:
space:
mode:
Diffstat (limited to 'morphlib/sourceresolver.py')
-rw-r--r--morphlib/sourceresolver.py28
1 files changed, 1 insertions, 27 deletions
diff --git a/morphlib/sourceresolver.py b/morphlib/sourceresolver.py
index a56b6594..0b6e1409 100644
--- a/morphlib/sourceresolver.py
+++ b/morphlib/sourceresolver.py
@@ -273,22 +273,7 @@ class SourceResolver(object):
else:
subref = extra_source.get('ref')
if not subref:
- if self.lrc.has_repo(reponame):
- repo = self.lrc.get_repo(reponame)
- if self.update and (
- repo.requires_update_for_ref(ref)):
- self.status(msg='Updating cached git '
- 'repository %(reponame)s for '
- 'ref %(ref)s',
- reponame=reponame, ref=ref)
- repo.update()
- else:
- # TODO Add support to the cache server for
- # retrieving the submodule commit from a path
- self.status(msg='Updating cached git repository '
- '%(reponame)s for ref %(ref)s',
- reponame=reponame, ref=ref)
- repo = self.lrc.get_updated_repo(reponame, ref)
+ repo = self.repo_cache.get_updated_repo(reponame, ref)
subref = repo.get_submodule_commit(
ref, extra_source['path'])
_, tree = self._resolve_ref(resolved_trees,
@@ -540,17 +525,6 @@ def create_source_pool(repo_cache, repo, ref, filenames,
def add_to_pool(reponame, ref, filename, absref, tree, morphology,
predefined_split_rules, subtrees):
- # If there are duplicate chunks which have the same 'name' and the
- # same build instructions, we might cause a stack overflow in
- # cachekeycomputer.py when trying to hash the build graph. The
- # _find_duplicate_chunks() function doesn't handle this case, it
- # is checking for duplicates with the same name but different build
- # instructions.
- if morphology['kind'] != 'stratum':
- if pool.lookup(reponame, ref, filename):
- raise morphlib.Error(
- "There are multiple versions of component '%s'" %
- morphology['name'])
sources = morphlib.source.make_sources(
reponame, ref, filename, absref, tree, morphology,