1 |
From: Chris Reffett <creffett@g.o> |
2 |
|
3 |
--- |
4 |
pym/repoman/checks.py | 15 +++++++++++++++ |
5 |
1 file changed, 15 insertions(+) |
6 |
|
7 |
diff --git a/pym/repoman/checks.py b/pym/repoman/checks.py |
8 |
index 85aa065..a408ee3 100644 |
9 |
--- a/pym/repoman/checks.py |
10 |
+++ b/pym/repoman/checks.py |
11 |
@@ -731,6 +731,21 @@ class DeprecatedHasq(LineCheck): |
12 |
re = re.compile(r'(^|.*\b)hasq\b') |
13 |
error = errors.HASQ_ERROR |
14 |
|
15 |
+# EAPI <2 checks |
16 |
+class Eapi01UndefinedPhases(LineCheck): |
17 |
+ repoman_check_name = 'EAPI.incompatible' |
18 |
+ undefined_phases_re = re.compile(r'^\s*(src_configure|src_prepare)\s*\(\)') |
19 |
+ |
20 |
+ def check_eapi(self, eapi): |
21 |
+ return eapi in ('0', '1') |
22 |
+ |
23 |
+ def check(self, num, line): |
24 |
+ m = self.undefined_phases_re.match(line) |
25 |
+ if m is not None: |
26 |
+ return ("%s" % m.group(1)) + \ |
27 |
+ " phase is not defined in EAPI=0/1 on line: %d" |
28 |
+ |
29 |
+ |
30 |
# EAPI-3 checks |
31 |
class Eapi3DeprecatedFuncs(LineCheck): |
32 |
repoman_check_name = 'EAPI.deprecated' |
33 |
-- |
34 |
1.8.5.1 |