summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-11-24 17:10:47 -0800
committerZac Medico <zmedico@gentoo.org>2010-11-24 17:10:47 -0800
commit38e28ed647b784c1c81c65c34d919f13be749e1a (patch)
treed1ac52d8cda1df762b4dc685e2ff0999eeb66c63
parentb67030859e9800292f601d326d203abc6f9e9270 (diff)
downloadportage-38e28ed647b784c1c81c65c34d919f13be749e1a.tar.gz
portage-38e28ed647b784c1c81c65c34d919f13be749e1a.tar.bz2
portage-38e28ed647b784c1c81c65c34d919f13be749e1a.zip
_get_usedep_re: make None eapi imply latest
-rw-r--r--pym/portage/dep/__init__.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/pym/portage/dep/__init__.py b/pym/portage/dep/__init__.py
index efba2f0d2..800a8ae89 100644
--- a/pym/portage/dep/__init__.py
+++ b/pym/portage/dep/__init__.py
@@ -31,7 +31,6 @@ import re, sys
import warnings
from itertools import chain
import portage.exception
-from portage.const import EAPI
from portage.eapi import eapi_has_slot_deps, eapi_has_src_uri_arrows, \
eapi_has_use_deps, eapi_has_strong_blocks, eapi_has_use_dep_defaults
from portage.exception import InvalidAtom, InvalidData, InvalidDependString
@@ -636,6 +635,13 @@ _usedep_re = {
}
def _get_usedep_re(eapi):
+ """
+ @param eapi: The EAPI
+ @type eapi: String or None
+ @rtype: regular expression object
+ @return: A regular expression object that matches valid USE flags for the
+ given eapi. If eapi is None then the latest supported EAPI is assumed.
+ """
return _usedep_re["0"]
# if eapi in ("0", "1", "2_pre1", "2_pre2", "2_pre3", "2", "3_pre1", "3_pre2", "3", "4_pre1"):
# return _usedep_re["0"]
@@ -673,8 +679,6 @@ class _use_dep(object):
def __init__(self, use, eapi, enabled_flags=None, disabled_flags=None, missing_enabled=None, \
missing_disabled=None, conditional=None, required=None):
- if eapi is None:
- eapi = str(EAPI)
self.eapi = eapi
if enabled_flags is not None: