summaryrefslogtreecommitdiffstats
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
parent45de6e3dbea776bba5f9483a9f23fbcc5c2f6520 (diff)
downloadportage-895e2cda1b83d282131eb4b12278654cc6bca141.tar.gz
portage-895e2cda1b83d282131eb4b12278654cc6bca141.tar.bz2
portage-895e2cda1b83d282131eb4b12278654cc6bca141.zip
match_from_list: handle Package.UNKNOWN_REPO
-rw-r--r--pym/_emerge/Package.py7
-rw-r--r--pym/portage/dep/__init__.py5
2 files changed, 8 insertions, 4 deletions
diff --git a/pym/_emerge/Package.py b/pym/_emerge/Package.py
index e4d416c8c..ec0c3f6d4 100644
--- a/pym/_emerge/Package.py
+++ b/pym/_emerge/Package.py
@@ -1,4 +1,4 @@
-# Copyright 1999-2011 Gentoo Foundation
+# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
import sys
@@ -8,7 +8,8 @@ from portage import _encodings, _unicode_decode, _unicode_encode
from portage.cache.mappings import slot_dict_class
from portage.const import EBUILD_PHASES
from portage.dep import Atom, check_required_use, use_reduce, \
- paren_enclose, _slot_re, _slot_separator, _repo_separator
+ paren_enclose, _slot_re, _slot_separator, _repo_separator, \
+ _unknown_repo
from portage.eapi import eapi_has_iuse_defaults, eapi_has_required_use
from portage.exception import InvalidDependString
from portage.repository.config import _gen_valid_repo
@@ -38,7 +39,7 @@ class Package(Task):
_dep_keys = ('DEPEND', 'PDEPEND', 'RDEPEND',)
_use_conditional_misc_keys = ('LICENSE', 'PROPERTIES', 'RESTRICT')
- UNKNOWN_REPO = "__unknown__"
+ UNKNOWN_REPO = _unknown_repo
def __init__(self, **kwargs):
Task.__init__(self, **kwargs)
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)