* [gentoo-commits] portage r12469 - in main/branches/2.1.6: bin man
@ 2009-01-12 8:24 Zac Medico (zmedico)
0 siblings, 0 replies; only message in thread
From: Zac Medico (zmedico) @ 2009-01-12 8:24 UTC (permalink / raw
To: gentoo-commits
Author: zmedico
Date: 2009-01-12 08:24:58 +0000 (Mon, 12 Jan 2009)
New Revision: 12469
Modified:
main/branches/2.1.6/bin/repoman
main/branches/2.1.6/man/repoman.1
Log:
Add a new 'metadata.warning' category and a check which detects local USE
descriptions that are not used in any ebuilds. Thanks to Markus Meier
<maekke@g.o> for the initial patch. (trunk r12413)
Modified: main/branches/2.1.6/bin/repoman
===================================================================
--- main/branches/2.1.6/bin/repoman 2009-01-12 08:24:29 UTC (rev 12468)
+++ main/branches/2.1.6/bin/repoman 2009-01-12 08:24:58 UTC (rev 12469)
@@ -315,6 +315,7 @@
"ebuild.badheader":"This ebuild has a malformed header",
"metadata.missing":"Missing metadata.xml files",
"metadata.bad":"Bad metadata.xml files",
+ "metadata.warning":"Warnings in metadata.xml files",
"virtual.versioned":"PROVIDE contains virtuals with versions",
"virtual.exists":"PROVIDE contains existing package names",
"virtual.unavailable":"PROVIDE contains a virtual which contains no profile default",
@@ -351,6 +352,7 @@
"file.size",
"inherit.autotools",
"java.eclassesnotused",
+"metadata.warning",
"virtual.versioned",
"virtual.exists",
"virtual.unavailable",
@@ -1063,11 +1065,14 @@
fails["metadata.bad"].append(x+"/metadata.xml")
del metadata_bad
+ muselist = frozenset(muselist)
changelog_path = os.path.join(checkdir_relative, "ChangeLog")
changelog_modified = changelog_path in modified_changelogs
allmasked = True
+ # detect unused local USE-descriptions
+ used_useflags = set()
for y in ebuildlist:
relative_path = os.path.join(x, y + ".ebuild")
@@ -1368,6 +1373,7 @@
default_use.append(myflag)
if flag_name not in uselist:
myuse.append(flag_name)
+ used_useflags.update(myuse)
# uselist checks - metadata
for mypos in range(len(myuse)-1,-1,-1):
@@ -1576,6 +1582,12 @@
stats["ebuild.allmasked"]+=1
fails["ebuild.allmasked"].append(x)
+ # check if there are unused local USE-descriptions in metadata.xml
+ for myflag in muselist.difference(used_useflags):
+ stats["metadata.warning"] += 1
+ fails["metadata.warning"].append(
+ "unused local USE-description: '%s'" % myflag)
+
if options.mode == "manifest":
sys.exit(dofail)
Modified: main/branches/2.1.6/man/repoman.1
===================================================================
--- main/branches/2.1.6/man/repoman.1 2009-01-12 08:24:29 UTC (rev 12468)
+++ main/branches/2.1.6/man/repoman.1 2009-01-12 08:24:58 UTC (rev 12469)
@@ -263,6 +263,9 @@
.B metadata.missing
Missing metadata.xml files
.TP
+.B metadata.warning
+Warnings in metadata.xml files
+.TP
.B upstream.workaround
The ebuild works around an upstream bug, an upstream bug should be filed and
tracked in bugs.gentoo.org
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-01-12 8:25 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-12 8:24 [gentoo-commits] portage r12469 - in main/branches/2.1.6: bin man Zac Medico (zmedico)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox