From: Arfrever Frehtes Taifersar Arahesis Date: Sat, 11 Feb 2012 22:14:43 +0000 (+0100) Subject: _emerge.MetadataRegen.MetadataRegen._iter_metadata_processes(): X-Git-Tag: v2.2.0_alpha86~7 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=7f605a874487e42b856d9a2ffd30fc0e587bae3f;p=portage.git _emerge.MetadataRegen.MetadataRegen._iter_metadata_processes(): Regenerate metadata for given cpv in each repository. --- diff --git a/pym/_emerge/MetadataRegen.py b/pym/_emerge/MetadataRegen.py index efe300421..e0c80925f 100644 --- a/pym/_emerge/MetadataRegen.py +++ b/pym/_emerge/MetadataRegen.py @@ -1,8 +1,9 @@ -# Copyright 1999-2011 Gentoo Foundation +# Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 import portage from portage import os +from portage.dep import _repo_separator from _emerge.EbuildMetadataPhase import EbuildMetadataPhase from _emerge.PollScheduler import PollScheduler @@ -61,26 +62,27 @@ class MetadataRegen(PollScheduler): break cp_set.add(cp) portage.writemsg_stdout("Processing %s\n" % cp) - cpv_list = portdb.cp_list(cp) - for cpv in cpv_list: - if self._terminated_tasks: - break - valid_pkgs.add(cpv) - ebuild_path, repo_path = portdb.findname2(cpv) - if ebuild_path is None: - raise AssertionError("ebuild not found for '%s'" % cpv) - metadata, ebuild_hash = portdb._pull_valid_cache( - cpv, ebuild_path, repo_path) - if metadata is not None: - if consumer is not None: - consumer(cpv, repo_path, metadata, ebuild_hash) - continue - - yield EbuildMetadataPhase(cpv=cpv, - ebuild_hash=ebuild_hash, - metadata_callback=portdb._metadata_callback, - portdb=portdb, repo_path=repo_path, - settings=portdb.doebuild_settings) + for repo in portdb.repositories: + cpv_list = portdb.cp_list(cp, mytree=[repo.location]) + for cpv in cpv_list: + if self._terminated_tasks: + break + valid_pkgs.add(cpv) + ebuild_path, repo_path = portdb.findname2(cpv, myrepo=repo.name) + if ebuild_path is None: + raise AssertionError("ebuild not found for '%s%s%s'" % (cpv, _repo_separator, repo.name)) + metadata, ebuild_hash = portdb._pull_valid_cache( + cpv, ebuild_path, repo_path) + if metadata is not None: + if consumer is not None: + consumer(cpv, repo_path, metadata, ebuild_hash) + continue + + yield EbuildMetadataPhase(cpv=cpv, + ebuild_hash=ebuild_hash, + metadata_callback=portdb._metadata_callback, + portdb=portdb, repo_path=repo_path, + settings=portdb.doebuild_settings) def _keep_scheduling(self): return self._remaining_tasks and not self._terminated_tasks