summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2011-05-31 15:22:02 -0700
committerZac Medico <zmedico@gentoo.org>2011-05-31 15:22:02 -0700
commit10f6c6d3c028a509ed943ef76633c72dbbcff7f6 (patch)
tree54fb5c7a914c1e157560189a59da166f88b0d80b
parent254e853c8a6aad06d4781b0eb0f5a1d2e1919754 (diff)
downloadportage-10f6c6d3c028a509ed943ef76633c72dbbcff7f6.tar.gz
portage-10f6c6d3c028a509ed943ef76633c72dbbcff7f6.tar.bz2
portage-10f6c6d3c028a509ed943ef76633c72dbbcff7f6.zip
repoman: disallow EMERGE_FROM in EAPI 4
We already have the Eapi4GoneVars check for AA and KV which were removed in EAPI 4, so we can re-use it to disallow EMERGE_FROM. This will fix bug #368865.
-rw-r--r--pym/repoman/checks.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/pym/repoman/checks.py b/pym/repoman/checks.py
index bc25cd58e..c9ada5fbb 100644
--- a/pym/repoman/checks.py
+++ b/pym/repoman/checks.py
@@ -619,10 +619,11 @@ class Eapi4IncompatibleFuncs(LineCheck):
class Eapi4GoneVars(LineCheck):
repoman_check_name = 'EAPI.incompatible'
ignore_line = re.compile(r'(^\s*#)')
- undefined_vars_re = re.compile(r'.*\$(\{(AA|KV)\}|(AA|KV))')
+ undefined_vars_re = re.compile(r'.*\$(\{(AA|KV|EMERGE_FROM)\}|(AA|KV|EMERGE_FROM))')
def check_eapi(self, eapi):
- return not eapi_exports_AA(eapi) or not eapi_exports_KV(eapi)
+ # AA, KV, and EMERGE_FROM should not be referenced in EAPI 4 or later.
+ return not eapi_exports_AA(eapi)
def check(self, num, line):
m = self.undefined_vars_re.match(line)