* [gentoo-soc] Re-post of patch
@ 2010-04-14 14:01 Nathan Eloe
0 siblings, 0 replies; only message in thread
From: Nathan Eloe @ 2010-04-14 14:01 UTC (permalink / raw
To: gentoo-soc
Apparently Google's web mail defaults to html, not plain-text, so here's my patch again in plaintext.
From 27865bf05e954bbe6d4c5996506aeec9908ba9d4 Mon Sep 17 00:00:00 2001
From: Nathan Eloe <powerofazure@gmail.com>
Date: Tue, 30 Mar 2010 10:04:10 -0500
Subject: [PATCH] Added check for src_prepare if ebuild inherits java-pkg-2 or java-ant-2
---
pym/repoman/checks.py | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/pym/repoman/checks.py b/pym/repoman/checks.py
index c918eea..73dd454 100644
--- a/pym/repoman/checks.py
+++ b/pym/repoman/checks.py
@@ -276,6 +276,18 @@ class EapiDefinition(LineCheck):
elif self.inherit_re.match(line) is not None:
self.inherit_line = line
+class EbuildJavaPrepare(LineCheck):
+ """Check that the ebuild uses java_prepare if the ebuild uses java-pkg-2 or java-ant-2"""
+ repoman_check_name = 'ebuild.javaprepare'
+ eapi_re_ant = re.compile(r'^\s*inherit\sjava-ant-2')
+ eapi_re_pkg = re.compile(r'^\s*inherit\sjava-pkg-2')
+ src_prep_re = re.compile(r'src_prepare')
+
+ def check(self,pkg):
+ if self.eapi_re_ant is not None or self.eapi_re_pkg is not None:
+ if self.src_prep_re is not None:
+ return "Please use java_prepare instead of src_prepare"
+
class EbuildPatches(LineCheck):
"""Ensure ebuilds use bash arrays for PATCHES to ensure white space safety"""
repoman_check_name = 'ebuild.patches'
--
1.6.3.3
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2010-04-14 14:01 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-14 14:01 [gentoo-soc] Re-post of patch Nathan Eloe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox