1 |
Author: zmedico |
2 |
Date: 2010-02-22 01:14:08 +0000 (Mon, 22 Feb 2010) |
3 |
New Revision: 15418 |
4 |
|
5 |
Modified: |
6 |
main/trunk/bin/repoman |
7 |
main/trunk/man/repoman.1 |
8 |
main/trunk/pym/repoman/checks.py |
9 |
Log: |
10 |
Bug #299095 - Add a deprecation warning for check_license calls with EAPI >= 3 |
11 |
since it is superceded by LICENSE masking. |
12 |
|
13 |
|
14 |
Modified: main/trunk/bin/repoman |
15 |
=================================================================== |
16 |
--- main/trunk/bin/repoman 2010-02-21 10:01:47 UTC (rev 15417) |
17 |
+++ main/trunk/bin/repoman 2010-02-22 01:14:08 UTC (rev 15418) |
18 |
@@ -288,6 +288,7 @@ |
19 |
"DESCRIPTION.missing":"Ebuilds that have a missing or empty DESCRIPTION variable", |
20 |
"DESCRIPTION.toolong":"DESCRIPTION is over %d characters" % max_desc_len, |
21 |
"EAPI.definition":"EAPI is defined after an inherit call (must be defined before)", |
22 |
+ "EAPI.deprecated":"Ebuilds that use features that are deprecated in the current EAPI", |
23 |
"EAPI.incompatible":"Ebuilds that use features that are only available with a different EAPI", |
24 |
"EAPI.unsupported":"Ebuilds that have an unsupported EAPI version (you must upgrade portage)", |
25 |
"SLOT.invalid":"Ebuilds that have a missing or invalid SLOT variable value", |
26 |
@@ -368,6 +369,7 @@ |
27 |
"DEPEND.badmaskedindev","RDEPEND.badmaskedindev","PDEPEND.badmaskedindev", |
28 |
"DEPEND.badtilde", "RDEPEND.badtilde", "PDEPEND.badtilde", |
29 |
"DESCRIPTION.toolong", |
30 |
+"EAPI.deprecated", |
31 |
"HOMEPAGE.virtual", |
32 |
"LICENSE.virtual", |
33 |
"KEYWORDS.dropped", |
34 |
|
35 |
Modified: main/trunk/man/repoman.1 |
36 |
=================================================================== |
37 |
--- main/trunk/man/repoman.1 2010-02-21 10:01:47 UTC (rev 15417) |
38 |
+++ main/trunk/man/repoman.1 2010-02-22 01:14:08 UTC (rev 15418) |
39 |
@@ -110,6 +110,9 @@ |
40 |
.B EAPI.definition |
41 |
EAPI is defined after an inherit call (must be defined before) |
42 |
.TP |
43 |
+.B EAPI.deprecated |
44 |
+Ebuilds that use features that are deprecated in the current EAPI |
45 |
+.TP |
46 |
.B EAPI.incompatible |
47 |
Ebuilds that use features that are only available with a different EAPI |
48 |
.TP |
49 |
|
50 |
Modified: main/trunk/pym/repoman/checks.py |
51 |
=================================================================== |
52 |
--- main/trunk/pym/repoman/checks.py 2010-02-21 10:01:47 UTC (rev 15417) |
53 |
+++ main/trunk/pym/repoman/checks.py 2010-02-22 01:14:08 UTC (rev 15418) |
54 |
@@ -438,6 +438,24 @@ |
55 |
re = re.compile('^.*built_with_use') |
56 |
error = errors.BUILT_WITH_USE |
57 |
|
58 |
+# EAPI-3 checks |
59 |
+class Eapi3DeprecatedFuncs(LineCheck): |
60 |
+ repoman_check_name = 'EAPI.deprecated' |
61 |
+ ignore_line = re.compile(r'(^\s*#)') |
62 |
+ deprecated_commands_re = re.compile(r'^\s*(check_license)\b') |
63 |
+ |
64 |
+ def new(self, pkg): |
65 |
+ self.eapi = pkg.metadata['EAPI'] |
66 |
+ |
67 |
+ def check_eapi(self, eapi): |
68 |
+ return self.eapi not in ('0', '1', '2') |
69 |
+ |
70 |
+ def check(self, num, line): |
71 |
+ m = self.deprecated_commands_re.match(line) |
72 |
+ if m is not None: |
73 |
+ return ("'%s'" % m.group(1)) + \ |
74 |
+ " has been deprecated in EAPI=3 on line: %d" |
75 |
+ |
76 |
# EAPI-4 checks |
77 |
class Eapi4IncompatibleFuncs(LineCheck): |
78 |
repoman_check_name = 'EAPI.incompatible' |
79 |
@@ -481,7 +499,8 @@ |
80 |
IUseUndefined, InheritAutotools, |
81 |
EMakeParallelDisabled, EMakeParallelDisabledViaMAKEOPTS, NoAsNeeded, |
82 |
DeprecatedBindnowFlags, SrcUnpackPatches, WantAutoDefaultValue, |
83 |
- SrcCompileEconf, Eapi4IncompatibleFuncs, Eapi4GoneVars, BuiltWithUse))) |
84 |
+ SrcCompileEconf, Eapi3DeprecatedFuncs, |
85 |
+ Eapi4IncompatibleFuncs, Eapi4GoneVars, BuiltWithUse))) |
86 |
|
87 |
_here_doc_re = re.compile(r'.*\s<<[-]?(\w+)$') |