Gentoo Archives: gentoo-commits

From: "Zac Medico (zmedico)" <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] portage r9585 - in main/trunk: bin man
Date: Fri, 28 Mar 2008 23:44:46
Message-Id: E1JfOFN-0005l2-AF@stork.gentoo.org
1 Author: zmedico
2 Date: 2008-03-28 23:44:32 +0000 (Fri, 28 Mar 2008)
3 New Revision: 9585
4
5 Modified:
6 main/trunk/bin/repoman
7 main/trunk/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.
13
14
15 Modified: main/trunk/bin/repoman
16 ===================================================================
17 --- main/trunk/bin/repoman 2008-03-28 23:11:29 UTC (rev 9584)
18 +++ main/trunk/bin/repoman 2008-03-28 23:44:32 UTC (rev 9585)
19 @@ -250,6 +250,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 @@ -326,6 +327,7 @@
28 "ebuild.minorsyn",
29 "ebuild.badheader",
30 "file.size",
31 +"java.eclassesnotused",
32 "metadata.missing",
33 "metadata.bad",
34 "virtual.versioned",
35 @@ -976,6 +978,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 @@ -1108,6 +1111,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 @@ -1156,6 +1160,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/trunk/man/repoman.1
65 ===================================================================
66 --- main/trunk/man/repoman.1 2008-03-28 23:11:29 UTC (rev 9584)
67 +++ main/trunk/man/repoman.1 2008-03-28 23:44:32 UTC (rev 9585)
68 @@ -238,6 +238,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