1 |
Author: zmedico |
2 |
Date: 2008-03-29 06:54:53 +0000 (Sat, 29 Mar 2008) |
3 |
New Revision: 9597 |
4 |
|
5 |
Modified: |
6 |
main/branches/2.1.2/bin/repoman |
7 |
main/branches/2.1.2/man/repoman.1 |
8 |
Log: |
9 |
Add a new "java.eclassesnotused" check for cases where DEPEND contains |
10 |
virtual/jdk and and the appropriate java eclass has not been inherited |
11 |
(a violation of the java team's policy). Thanks to Betelgeuse for the |
12 |
initial patch. (trunk r9585) |
13 |
|
14 |
|
15 |
Modified: main/branches/2.1.2/bin/repoman |
16 |
=================================================================== |
17 |
--- main/branches/2.1.2/bin/repoman 2008-03-29 06:49:55 UTC (rev 9596) |
18 |
+++ main/branches/2.1.2/bin/repoman 2008-03-29 06:54:53 UTC (rev 9597) |
19 |
@@ -166,6 +166,7 @@ |
20 |
"file.size":"Files in the files directory must be under 20k", |
21 |
"file.name":"File/dir name must be composed of only the following chars: %s " % allowed_filename_chars, |
22 |
"file.UTF8":"File is not UTF8 compliant", |
23 |
+ "java.eclassesnotused":"With virtual/jdk in DEPEND you must inherit a java eclass", |
24 |
"KEYWORDS.dropped":"Ebuilds that appear to have dropped KEYWORDS for some arch", |
25 |
"KEYWORDS.missing":"Ebuilds that have a missing or empty KEYWORDS variable", |
26 |
"KEYWORDS.stable":"Ebuilds that have been added directly with stable KEYWORDS", |
27 |
@@ -243,6 +244,7 @@ |
28 |
"ebuild.minorsyn", |
29 |
"ebuild.badheader", |
30 |
"file.size", |
31 |
+"java.eclassesnotused", |
32 |
"metadata.missing", |
33 |
"metadata.bad", |
34 |
"virtual.versioned", |
35 |
@@ -1463,6 +1465,7 @@ |
36 |
|
37 |
myaux = ebuild_metadata[y] |
38 |
eapi = myaux["EAPI"] |
39 |
+ inherited = myaux["INHERITED"].split() |
40 |
|
41 |
# Test for negative logic and bad words in the RESTRICT var. |
42 |
#for x in myaux[allvars.index("RESTRICT")].split(): |
43 |
@@ -1595,6 +1598,7 @@ |
44 |
myflag = myflag[1:] |
45 |
myiuse.add(myflag) |
46 |
|
47 |
+ inherited_java_eclass = "java-pkg" in inherited |
48 |
operator_tokens = set(["||", "(", ")"]) |
49 |
type_list, badsyntax = [], [] |
50 |
for mytype in ("DEPEND", "RDEPEND", "PDEPEND", "LICENSE", "PROVIDE"): |
51 |
@@ -1643,6 +1647,11 @@ |
52 |
badsyntax.append("'%s' not a valid atom" % token) |
53 |
else: |
54 |
atom = token.lstrip("!") |
55 |
+ if mytype == "DEPEND" and \ |
56 |
+ not inherited_java_eclass and \ |
57 |
+ portage.dep_getkey(atom) == "virtual/jdk": |
58 |
+ stats['java.eclassesnotused'] += 1 |
59 |
+ fails['java.eclassesnotused'].append(relative_path) |
60 |
if eapi == "0": |
61 |
if portage_dep.dep_getslot(atom): |
62 |
stats['EAPI.incompatible'] += 1 |
63 |
|
64 |
Modified: main/branches/2.1.2/man/repoman.1 |
65 |
=================================================================== |
66 |
--- main/branches/2.1.2/man/repoman.1 2008-03-29 06:49:55 UTC (rev 9596) |
67 |
+++ main/branches/2.1.2/man/repoman.1 2008-03-29 06:54:53 UTC (rev 9597) |
68 |
@@ -256,6 +256,10 @@ |
69 |
.B filedir.missing |
70 |
Package lacks a files directory |
71 |
.TP |
72 |
+.B java.eclassesnotused |
73 |
+With virtual/jdk in DEPEND you must inherit a java eclass. Refer to |
74 |
+\fIhttp://www.gentoo.org/proj/en/java/java\-devel.xml\fR for more information. |
75 |
+.TP |
76 |
.B metadata.bad |
77 |
Bad metadata.xml files |
78 |
.TP |
79 |
|
80 |
-- |
81 |
gentoo-commits@l.g.o mailing list |