aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2012-05-12 16:27:32 -0700
committerZac Medico <zmedico@gentoo.org>2012-05-12 16:27:32 -0700
commit895e2cda1b83d282131eb4b12278654cc6bca141 (patch)
tree224347ad8849b565cf8555c7573f32fb73e56606 /pym/portage/dep
parent_pkg_str: add cpv attribute for match_from_list (diff)
downloadportage-895e2cda1b83d282131eb4b12278654cc6bca141.tar.gz
portage-895e2cda1b83d282131eb4b12278654cc6bca141.tar.bz2
portage-895e2cda1b83d282131eb4b12278654cc6bca141.zip
match_from_list: handle Package.UNKNOWN_REPO
Diffstat (limited to 'pym/portage/dep')
-rw-r--r--pym/portage/dep/__init__.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/pym/portage/dep/__init__.py b/pym/portage/dep/__init__.py
index de8d1c4d1..d4888e086 100644
--- a/pym/portage/dep/__init__.py
+++ b/pym/portage/dep/__init__.py
@@ -54,6 +54,8 @@ if sys.hexversion >= 0x3000000:
# stable keywords, make these warnings unconditional.
_internal_warnings = False
+_unknown_repo = "__unknown__"
+
def cpvequal(cpv1, cpv2):
"""
@@ -2086,7 +2088,8 @@ def match_from_list(mydep, candidate_list):
repo = getattr(x, "repo", False)
if repo is False:
repo = dep_getrepo(x)
- if repo is not None and repo != mydep.repo:
+ if repo is not None and repo != _unknown_repo and \
+ repo != mydep.repo:
continue
mylist.append(x)