-# 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
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