1 |
Apparently Google's web mail defaults to html, not plain-text, so here's my patch again in plaintext. |
2 |
|
3 |
From 27865bf05e954bbe6d4c5996506aeec9908ba9d4 Mon Sep 17 00:00:00 2001 |
4 |
From: Nathan Eloe <powerofazure@×××××.com> |
5 |
Date: Tue, 30 Mar 2010 10:04:10 -0500 |
6 |
Subject: [PATCH] Added check for src_prepare if ebuild inherits java-pkg-2 or java-ant-2 |
7 |
|
8 |
--- |
9 |
pym/repoman/checks.py | 12 ++++++++++++ |
10 |
1 files changed, 12 insertions(+), 0 deletions(-) |
11 |
|
12 |
diff --git a/pym/repoman/checks.py b/pym/repoman/checks.py |
13 |
index c918eea..73dd454 100644 |
14 |
--- a/pym/repoman/checks.py |
15 |
+++ b/pym/repoman/checks.py |
16 |
@@ -276,6 +276,18 @@ class EapiDefinition(LineCheck): |
17 |
elif self.inherit_re.match(line) is not None: |
18 |
self.inherit_line = line |
19 |
|
20 |
+class EbuildJavaPrepare(LineCheck): |
21 |
+ """Check that the ebuild uses java_prepare if the ebuild uses java-pkg-2 or java-ant-2""" |
22 |
+ repoman_check_name = 'ebuild.javaprepare' |
23 |
+ eapi_re_ant = re.compile(r'^\s*inherit\sjava-ant-2') |
24 |
+ eapi_re_pkg = re.compile(r'^\s*inherit\sjava-pkg-2') |
25 |
+ src_prep_re = re.compile(r'src_prepare') |
26 |
+ |
27 |
+ def check(self,pkg): |
28 |
+ if self.eapi_re_ant is not None or self.eapi_re_pkg is not None: |
29 |
+ if self.src_prep_re is not None: |
30 |
+ return "Please use java_prepare instead of src_prepare" |
31 |
+ |
32 |
class EbuildPatches(LineCheck): |
33 |
"""Ensure ebuilds use bash arrays for PATCHES to ensure white space safety""" |
34 |
repoman_check_name = 'ebuild.patches' |
35 |
-- |
36 |
1.6.3.3 |