From: Zac Medico Date: Thu, 10 Jan 2013 03:57:09 +0000 (-0800) Subject: FetchIterator: use RepoConfig.load_manifest() X-Git-Tag: v2.2.0_alpha150~11 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=243080ecc5e867a4ab96d093b9cd3542c7337633;p=portage.git FetchIterator: use RepoConfig.load_manifest() --- diff --git a/pym/portage/_emirrordist/FetchIterator.py b/pym/portage/_emirrordist/FetchIterator.py index cc5d4be00..58044ac89 100644 --- a/pym/portage/_emirrordist/FetchIterator.py +++ b/pym/portage/_emirrordist/FetchIterator.py @@ -4,7 +4,6 @@ from portage import os from portage.dep import use_reduce from portage.exception import PortageException -from portage.manifest import Manifest from .FetchTask import FetchTask class FetchIterator(object): @@ -24,6 +23,7 @@ class FetchIterator(object): def __iter__(self): portdb = self._config.portdb + get_repo_for_location = portdb.repositories.get_repo_for_location file_owners = self._config.file_owners file_failures = self._config.file_failures restrict_mirror_exemptions = self._config.restrict_mirror_exemptions @@ -35,6 +35,7 @@ class FetchIterator(object): # Reset state so the Manifest is pulled once # for this cp / tree combination. digests = None + repo_config = get_repo_for_location(tree) for cpv in portdb.cp_list(cp, mytree=tree): @@ -95,8 +96,9 @@ class FetchIterator(object): # Parse Manifest for this cp if we haven't yet. if digests is None: try: - digests = Manifest(os.path.join( - tree, cp)).getTypeDigests("DIST") + digests = repo_config.load_manifest( + os.path.join(repo_config.location, cp) + ).getTypeDigests("DIST") except (EnvironmentError, PortageException) as e: for filename in uri_map: self._log_failure(