public inbox for gentoo-soc@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-soc] Patch to link for GSoC project
@ 2010-04-13 23:19 Nathan Eloe
  0 siblings, 0 replies; only message in thread
From: Nathan Eloe @ 2010-04-13 23:19 UTC (permalink / raw
  To: gentoo-soc

[-- Attachment #1: Type: text/plain, Size: 1499 bytes --]

Petteri Raty asked me to actually write a patch instead of just performing a
git-commit.  I emailed the patch, and will post it here so I can link to it
from my proposal
It doesn't quite fit the request.

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

[-- Attachment #2: Type: text/html, Size: 2935 bytes --]

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2010-04-13 23:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-13 23:19 [gentoo-soc] Patch to link for GSoC project Nathan Eloe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox