1 |
commit: a8be8f23dc84e92b9163f152af9640c2a37bad0b |
2 |
Author: Zac Medico <zmedico <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Feb 26 00:19:01 2011 +0000 |
4 |
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Mar 1 20:52:31 2011 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=a8be8f23 |
7 |
|
8 |
repoman: add back portage.internal check |
9 |
|
10 |
This check got removed for bug #262365, but now that EAPI 4 is released |
11 |
we can add it back. Now it checks for ecompress/ecompressdir too (for |
12 |
bug #218347). |
13 |
|
14 |
--- |
15 |
bin/repoman | 2 ++ |
16 |
man/repoman.1 | 3 +++ |
17 |
pym/repoman/checks.py | 12 +++++++++++- |
18 |
3 files changed, 16 insertions(+), 1 deletions(-) |
19 |
|
20 |
diff --git a/bin/repoman b/bin/repoman |
21 |
index b694b6c..8b1efc5 100755 |
22 |
--- a/bin/repoman |
23 |
+++ b/bin/repoman |
24 |
@@ -364,6 +364,7 @@ qahelp={ |
25 |
"metadata.missing":"Missing metadata.xml files", |
26 |
"metadata.bad":"Bad metadata.xml files", |
27 |
"metadata.warning":"Warnings in metadata.xml files", |
28 |
+ "portage.internal":"The ebuild uses an internal Portage function", |
29 |
"virtual.versioned":"PROVIDE contains virtuals with versions", |
30 |
"virtual.exists":"PROVIDE contains existing package names", |
31 |
"virtual.unavailable":"PROVIDE contains a virtual which contains no profile default", |
32 |
@@ -410,6 +411,7 @@ qawarnings = set(( |
33 |
"java.eclassesnotused", |
34 |
"wxwidgets.eclassnotused", |
35 |
"metadata.warning", |
36 |
+"portage.internal", |
37 |
"virtual.versioned", |
38 |
"virtual.exists", |
39 |
"virtual.unavailable", |
40 |
|
41 |
diff --git a/man/repoman.1 b/man/repoman.1 |
42 |
index f9501bf..162b62b 100644 |
43 |
--- a/man/repoman.1 |
44 |
+++ b/man/repoman.1 |
45 |
@@ -330,6 +330,9 @@ Missing metadata.xml files |
46 |
.B metadata.warning |
47 |
Warnings in metadata.xml files |
48 |
.TP |
49 |
+.B portage.internal |
50 |
+The ebuild uses an internal Portage function |
51 |
+.TP |
52 |
.B upstream.workaround |
53 |
The ebuild works around an upstream bug, an upstream bug should be filed and |
54 |
tracked in bugs.gentoo.org |
55 |
|
56 |
diff --git a/pym/repoman/checks.py b/pym/repoman/checks.py |
57 |
index 5bf039b..a05c128 100644 |
58 |
--- a/pym/repoman/checks.py |
59 |
+++ b/pym/repoman/checks.py |
60 |
@@ -623,6 +623,16 @@ class Eapi4GoneVars(LineCheck): |
61 |
return ("variable '$%s'" % m.group(1)) + \ |
62 |
" is gone in EAPI=4 on line: %d" |
63 |
|
64 |
+class PortageInternal(LineCheck): |
65 |
+ repoman_check_name = 'portage.internal' |
66 |
+ re = re.compile(r'[^#]*\b(ecompress|ecompressdir|prepalldocs)\b') |
67 |
+ |
68 |
+ def check(self, num, line): |
69 |
+ """Run the check on line and return error if there is one""" |
70 |
+ m = self.re.match(line) |
71 |
+ if m is not None: |
72 |
+ return ("'%s'" % m.group(1)) + " called on line: %d" |
73 |
+ |
74 |
_constant_checks = tuple((c() for c in ( |
75 |
EbuildHeader, EbuildWhitespace, EbuildBlankLine, EbuildQuote, |
76 |
EbuildAssignment, Eapi3EbuildAssignment, EbuildUselessDodoc, |
77 |
@@ -633,7 +643,7 @@ _constant_checks = tuple((c() for c in ( |
78 |
DeprecatedBindnowFlags, SrcUnpackPatches, WantAutoDefaultValue, |
79 |
SrcCompileEconf, Eapi3DeprecatedFuncs, NoOffsetWithHelpers, |
80 |
Eapi4IncompatibleFuncs, Eapi4GoneVars, BuiltWithUse, |
81 |
- PreserveOldLib, SandboxAddpredict))) |
82 |
+ PreserveOldLib, SandboxAddpredict, PortageInternal))) |
83 |
|
84 |
_here_doc_re = re.compile(r'.*\s<<[-]?(\w+)$') |