1 |
commit: 658c0fd5940b9547cbdf09d4d4ea6552cfbd542a |
2 |
Author: Ulrich Müller <ulm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Oct 31 17:42:20 2012 +0000 |
4 |
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Oct 31 21:30:35 2012 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=658c0fd5 |
7 |
|
8 |
repoman: add check for deprecated licenses, bug 440638 |
9 |
|
10 |
--- |
11 |
bin/repoman | 12 ++++++++++++ |
12 |
man/repoman.1 | 5 ++++- |
13 |
2 files changed, 16 insertions(+), 1 deletions(-) |
14 |
|
15 |
diff --git a/bin/repoman b/bin/repoman |
16 |
index 1502d6b..553b1d2 100755 |
17 |
--- a/bin/repoman |
18 |
+++ b/bin/repoman |
19 |
@@ -359,6 +359,7 @@ qahelp={ |
20 |
"IUSE.invalid":"This ebuild has a variable in IUSE that is not in the use.desc or its metadata.xml file", |
21 |
"IUSE.missing":"This ebuild has a USE conditional which references a flag that is not listed in IUSE", |
22 |
"LICENSE.invalid":"This ebuild is listing a license that doesnt exist in portages license/ dir.", |
23 |
+ "LICENSE.deprecated":"This ebuild is listing a deprecated license.", |
24 |
"KEYWORDS.invalid":"This ebuild contains KEYWORDS that are not listed in profiles/arch.list or for which no valid profile was found", |
25 |
"RDEPEND.implicit":"RDEPEND is unset in the ebuild which triggers implicit RDEPEND=$DEPEND assignment (prior to EAPI 4)", |
26 |
"RDEPEND.suspect":"RDEPEND contains a package that usually only belongs in DEPEND.", |
27 |
@@ -398,6 +399,7 @@ qawarnings = set(( |
28 |
"DESCRIPTION.toolong", |
29 |
"EAPI.deprecated", |
30 |
"HOMEPAGE.virtual", |
31 |
+"LICENSE.deprecated", |
32 |
"LICENSE.virtual", |
33 |
"KEYWORDS.dropped", |
34 |
"KEYWORDS.stupid", |
35 |
@@ -922,6 +924,13 @@ for x in repoman_settings.archlist(): |
36 |
print(red("up with the "+x+" team.")) |
37 |
print() |
38 |
|
39 |
+global_noiselimit = portage.util.noiselimit |
40 |
+# Suppress error message if @DEPRECATED license group doesn't exist |
41 |
+portage.util.noiselimit = -2 |
42 |
+liclist_deprecated = \ |
43 |
+ set(repoman_settings._license_manager.expandLicenseTokens(["@DEPRECATED"])) |
44 |
+portage.util.noiselimit = global_noiselimit |
45 |
+ |
46 |
if not liclist: |
47 |
logging.fatal("Couldn't find licenses?") |
48 |
sys.exit(1) |
49 |
@@ -2014,6 +2023,9 @@ for x in effective_scanlist: |
50 |
if lic not in liclist and lic != "||": |
51 |
stats["LICENSE.invalid"]=stats["LICENSE.invalid"]+1 |
52 |
fails["LICENSE.invalid"].append(x+"/"+y+".ebuild: %s" % lic) |
53 |
+ elif lic in liclist_deprecated: |
54 |
+ stats["LICENSE.deprecated"] = stats["LICENSE.deprecated"] + 1 |
55 |
+ fails["LICENSE.deprecated"].append("%s: %s" % (relative_path, lic)) |
56 |
|
57 |
#keyword checks |
58 |
myuse = myaux["KEYWORDS"].split() |
59 |
|
60 |
diff --git a/man/repoman.1 b/man/repoman.1 |
61 |
index 6dd75e8..e715f05 100644 |
62 |
--- a/man/repoman.1 |
63 |
+++ b/man/repoman.1 |
64 |
@@ -1,4 +1,4 @@ |
65 |
-.TH "REPOMAN" "1" "June 2012" "Portage VERSION" "Portage" |
66 |
+.TH "REPOMAN" "1" "Oct 2012" "Portage VERSION" "Portage" |
67 |
.SH NAME |
68 |
repoman \- Gentoo's program to enforce a minimal level of quality assurance in packages added to the portage tree |
69 |
.SH SYNOPSIS |
70 |
@@ -167,6 +167,9 @@ Ebuilds that have been added directly with stable KEYWORDS |
71 |
.B KEYWORDS.stupid |
72 |
Ebuilds that use KEYWORDS=-* instead of package.mask |
73 |
.TP |
74 |
+.B LICENSE.deprecated |
75 |
+This ebuild is listing a deprecated license. |
76 |
+.TP |
77 |
.B LICENSE.invalid |
78 |
This ebuild is listing a license that doesnt exist in portages license/ dir. |
79 |
.TP |