From b72cc9a9ea7537125bcd813473ee52dc39712719 Mon Sep 17 00:00:00 2001 From: Pedro Alvarez Date: Fri, 25 Mar 2016 13:55:01 +0000 Subject: Fixes needed Change-Id: Ie527ff7228987afbfcce3c105d6d9192a366e65d --- morphlib/sourceresolver.py | 28 +--------------------------- 1 file changed, 1 insertion(+), 27 deletions(-) (limited to 'morphlib/sourceresolver.py') 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, -- cgit v1.2.1