Gentoo Archives: gentoo-soc

From: Nathan Eloe <powerofazure@×××××.com>
To: gentoo-soc@l.g.o
Subject: [gentoo-soc] Patch to link for GSoC project
Date: Tue, 13 Apr 2010 23:19:21
Message-Id: g2g1a47d4a41004131619g6c0b506ah5ba401ca3fb5cbb6@mail.gmail.com
1 Petteri Raty asked me to actually write a patch instead of just performing a
2 git-commit. I emailed the patch, and will post it here so I can link to it
3 from my proposal
4 It doesn't quite fit the request.
5
6 From 27865bf05e954bbe6d4c5996506aeec9908ba9d4 Mon Sep 17 00:00:00 2001
7 From: Nathan Eloe <powerofazure@×××××.com>
8 Date: Tue, 30 Mar 2010 10:04:10 -0500
9 Subject: [PATCH] Added check for src_prepare if ebuild inherits java-pkg-2
10 or java-ant-2
11
12 ---
13 pym/repoman/checks.py | 12 ++++++++++++
14 1 files changed, 12 insertions(+), 0 deletions(-)
15
16 diff --git a/pym/repoman/checks.py b/pym/repoman/checks.py
17 index c918eea..73dd454 100644
18 --- a/pym/repoman/checks.py
19 +++ b/pym/repoman/checks.py
20 @@ -276,6 +276,18 @@ class EapiDefinition(LineCheck):
21 elif self.inherit_re.match(line) is not None:
22 self.inherit_line = line
23
24 +class EbuildJavaPrepare(LineCheck):
25 + """Check that the ebuild uses java_prepare if the ebuild uses java-pkg-2
26 or java-ant-2"""
27 + repoman_check_name = 'ebuild.javaprepare'
28 + eapi_re_ant = re.compile(r'^\s*inherit\sjava-ant-2')
29 + eapi_re_pkg = re.compile(r'^\s*inherit\sjava-pkg-2')
30 + src_prep_re = re.compile(r'src_prepare')
31 +
32 + def check(self,pkg):
33 + if self.eapi_re_ant is not None or self.eapi_re_pkg is not None:
34 + if self.src_prep_re is not None:
35 + return "Please use java_prepare instead of src_prepare"
36 +
37 class EbuildPatches(LineCheck):
38 """Ensure ebuilds use bash arrays for PATCHES to ensure white space
39 safety"""
40 repoman_check_name = 'ebuild.patches'
41 --
42 1.6.3.3