summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-10-01 07:18:19 -0700
committerZac Medico <zmedico@gentoo.org>2010-10-01 07:18:19 -0700
commita6c6eadd2c96dc1d442baee06508a7bcf11f13d2 (patch)
treecbb715d61b09807ed1c0150b2ac1c12d59a61d27
parent89b3d2359403a16f45ec353dd55b61c6a82659bc (diff)
downloadportage-a6c6eadd2c96dc1d442baee06508a7bcf11f13d2.tar.gz
portage-a6c6eadd2c96dc1d442baee06508a7bcf11f13d2.tar.bz2
portage-a6c6eadd2c96dc1d442baee06508a7bcf11f13d2.zip
Bug #339316 - Fix --resume to handle repo masks.
-rw-r--r--pym/_emerge/depgraph.py20
1 files changed, 17 insertions, 3 deletions
diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py
index 857e6df20..a533a86b8 100644
--- a/pym/_emerge/depgraph.py
+++ b/pym/_emerge/depgraph.py
@@ -5014,14 +5014,28 @@ class depgraph(object):
repo = atom.repo
break
+ atom = "=" + pkg_key
+ if repo:
+ atom = atom + _repo_separator + repo
+
try:
- pkg = self._pkg(pkg_key, pkg_type, root_config, myrepo=repo)
- except portage.exception.PackageNotFound:
+ atom = Atom(atom, allow_repo=True)
+ except InvalidAtom:
+ continue
+
+ pkg = None
+ for pkg in self._iter_match_pkgs(root_config, pkg_type, atom):
+ if not pkg.visible or \
+ self._frozen_config.excluded_pkgs.findAtomForPackage(pkg,
+ modified_use=self._pkg_use_enabled(pkg)):
+ continue
+
+ if pkg is None:
# It does no exist or it is corrupt.
if skip_missing:
# TODO: log these somewhere
continue
- raise
+ raise portage.exception.PackageNotFound(pkg_key)
if "merge" == pkg.operation and \
self._frozen_config.excluded_pkgs.findAtomForPackage(pkg, \