From: creffett@gentoo.org
To: gentoo-portage-dev@lists.gentoo.org
Cc: Chris Reffett <creffett@gentoo.org>
Subject: [gentoo-portage-dev] [PATCH] Add repoman check to warn if src_prepare/src_configure are used in EAPI 0/1
Date: Mon, 13 Jan 2014 19:08:30 -0500 [thread overview]
Message-ID: <1389658110-14528-1-git-send-email-creffett@gentoo.org> (raw)
From: Chris Reffett <creffett@gentoo.org>
---
pym/repoman/checks.py | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/pym/repoman/checks.py b/pym/repoman/checks.py
index 85aa065..a408ee3 100644
--- a/pym/repoman/checks.py
+++ b/pym/repoman/checks.py
@@ -731,6 +731,21 @@ class DeprecatedHasq(LineCheck):
re = re.compile(r'(^|.*\b)hasq\b')
error = errors.HASQ_ERROR
+# EAPI <2 checks
+class Eapi01UndefinedPhases(LineCheck):
+ repoman_check_name = 'EAPI.incompatible'
+ undefined_phases_re = re.compile(r'^\s*(src_configure|src_prepare)\s*\(\)')
+
+ def check_eapi(self, eapi):
+ return eapi in ('0', '1')
+
+ def check(self, num, line):
+ m = self.undefined_phases_re.match(line)
+ if m is not None:
+ return ("%s" % m.group(1)) + \
+ " phase is not defined in EAPI=0/1 on line: %d"
+
+
# EAPI-3 checks
class Eapi3DeprecatedFuncs(LineCheck):
repoman_check_name = 'EAPI.deprecated'
--
1.8.5.1
next reply other threads:[~2014-01-14 0:09 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-14 0:08 creffett [this message]
2014-01-14 0:50 ` [gentoo-portage-dev] [PATCH] Add repoman check to warn if src_prepare/src_configure are used in EAPI 0/1 Mike Frysinger
2014-01-14 3:23 ` Tom Wijsman
2014-01-14 4:59 ` Mike Frysinger
2014-01-14 5:37 ` Brian Dolbec
2014-01-14 6:37 ` Mike Frysinger
2014-01-14 21:15 ` Tom Wijsman
2014-01-19 9:44 ` Mike Frysinger
-- strict thread matches above, loose matches on Subject: below --
2014-01-19 16:59 Mike Gilbert
2014-01-20 5:47 ` Mike Frysinger
2014-01-20 6:02 ` Alec Warner
2014-01-20 6:40 ` Mike Frysinger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1389658110-14528-1-git-send-email-creffett@gentoo.org \
--to=creffett@gentoo.org \
--cc=gentoo-portage-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox