From: Arfrever Frehtes Taifersar Arahesis Date: Wed, 30 May 2012 00:40:15 +0000 (+0200) Subject: portage.dep.Atom: Ignore allow_repo argument when non-None eapi is passed. X-Git-Tag: v2.2.0_alpha109~27 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=587cce4816afc7d57b3edf0be6c0670ec0be89c9;p=portage.git portage.dep.Atom: Ignore allow_repo argument when non-None eapi is passed. Allow repository when allow_repo=False is not passed and eapi=None is passed. --- diff --git a/pym/portage/dep/__init__.py b/pym/portage/dep/__init__.py index 152af0aa8..d29a4c4a1 100644 --- a/pym/portage/dep/__init__.py +++ b/pym/portage/dep/__init__.py @@ -1068,11 +1068,11 @@ class Atom(_atom_base): def __init__(self, forbid_overlap=False): self.overlap = self._overlap(forbid=forbid_overlap) - def __new__(cls, s, unevaluated_atom=None, allow_wildcard=False, allow_repo=False, + def __new__(cls, s, unevaluated_atom=None, allow_wildcard=False, allow_repo=None, _use=None, eapi=None, is_valid_flag=None): return _atom_base.__new__(cls, s) - def __init__(self, s, unevaluated_atom=None, allow_wildcard=False, allow_repo=False, + def __init__(self, s, unevaluated_atom=None, allow_wildcard=False, allow_repo=None, _use=None, eapi=None, is_valid_flag=None): if isinstance(s, Atom): # This is an efficiency assertion, to ensure that the Atom @@ -1087,8 +1087,13 @@ class Atom(_atom_base): _atom_base.__init__(s) atom_re = _get_atom_re(eapi) - if eapi_has_repo_deps(eapi): - allow_repo = True + + if eapi is not None: + # Ignore allow_repo when eapi is specified. + allow_repo = eapi_has_repo_deps(eapi) + else: + if allow_repo is None: + allow_repo = True if "!" == s[:1]: blocker = self._blocker(forbid_overlap=("!" == s[1:2]))