diff options
author | Zac Medico <zmedico@gentoo.org> | 2011-06-08 10:24:23 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2011-06-08 10:24:23 -0700 |
commit | 706dd18b2a2936b0fe6a3bed7e1932eef54f0bd1 (patch) | |
tree | bf622135d78a175a9375add83219de2e14bfb4d3 /pym/portage | |
parent | c36d3ea4dec51781f0a1a3f45c3d2565e9ca2f95 (diff) | |
download | portage-706dd18b2a2936b0fe6a3bed7e1932eef54f0bd1.tar.gz portage-706dd18b2a2936b0fe6a3bed7e1932eef54f0bd1.tar.bz2 portage-706dd18b2a2936b0fe6a3bed7e1932eef54f0bd1.zip |
extract_affecting_use: _get_useflag_re(eapi)
This is needed for EAPI="4-python" added in commit
586760f37fb9784327d8447182d49810662f4427.
Diffstat (limited to 'pym/portage')
-rw-r--r-- | pym/portage/dep/__init__.py | 4 | ||||
-rw-r--r-- | pym/portage/tests/dep/testExtractAffectingUSE.py | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/pym/portage/dep/__init__.py b/pym/portage/dep/__init__.py index 9dfb12538..8332a05e4 100644 --- a/pym/portage/dep/__init__.py +++ b/pym/portage/dep/__init__.py @@ -2291,7 +2291,7 @@ def check_required_use(required_use, use, iuse_match): tree._satisfied = False not in stack[0] return tree -def extract_affecting_use(mystr, atom): +def extract_affecting_use(mystr, atom, eapi=None): """ Take a dep string and an atom and return the use flags that decide if the given atom is in effect. @@ -2308,7 +2308,7 @@ def extract_affecting_use(mystr, atom): @rtype: Tuple of two lists of strings @return: List of use flags that need to be enabled, List of use flag that need to be disabled """ - useflag_re = _get_useflag_re(None) + useflag_re = _get_useflag_re(eapi) mysplit = mystr.split() level = 0 stack = [[]] diff --git a/pym/portage/tests/dep/testExtractAffectingUSE.py b/pym/portage/tests/dep/testExtractAffectingUSE.py index 029cc6ee9..026a55274 100644 --- a/pym/portage/tests/dep/testExtractAffectingUSE.py +++ b/pym/portage/tests/dep/testExtractAffectingUSE.py @@ -63,7 +63,7 @@ class TestExtractAffectingUSE(TestCase): for dep, atom, expected in test_cases: expected = set(expected) - result = extract_affecting_use(dep, atom) + result = extract_affecting_use(dep, atom, eapi="0") fail_msg = "dep: " + dep + ", atom: " + atom + ", got: " + \ " ".join(sorted(result)) + ", expected: " + " ".join(sorted(expected)) self.assertEqual(result, expected, fail_msg) @@ -72,4 +72,4 @@ class TestExtractAffectingUSE(TestCase): fail_msg = "dep: " + dep + ", atom: " + atom + ", got: " + \ " ".join(sorted(result)) + ", expected: " + " ".join(sorted(expected)) self.assertRaisesMsg(fail_msg, \ - InvalidDependString, extract_affecting_use, dep, atom) + InvalidDependString, extract_affecting_use, dep, atom, eapi="0") |