summaryrefslogtreecommitdiffstats
path: root/bin/repoman
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2012-06-17 11:42:51 +0300
committerZac Medico <zmedico@gentoo.org>2012-06-17 08:45:01 -0700
commit4cd3da7f48b74abfc48d36cf2c700c4eebfcbb40 (patch)
treee14799850cf505a9e429627f7bd03e4def479d13 /bin/repoman
parenta4ea52918c3cccaf2459fa2264ab0219071de70a (diff)
downloadportage-4cd3da7f48b74abfc48d36cf2c700c4eebfcbb40.tar.gz
portage-4cd3da7f48b74abfc48d36cf2c700c4eebfcbb40.tar.bz2
portage-4cd3da7f48b74abfc48d36cf2c700c4eebfcbb40.zip
repoman: add 'VIRTUAL.suspect' class of warnings
Searches all the *DEPENDS against static map of: { 'package' : 'virtual' } Example output: > VIRTUAL.suspect 1 > dev-haskell/cabal/cabal-1.15.0_pre20120608.ebuild: consider using 'virtual/pkgconfig' insted of 'dev-util/pkgconf' Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Diffstat (limited to 'bin/repoman')
-rwxr-xr-xbin/repoman18
1 files changed, 18 insertions, 0 deletions
diff --git a/bin/repoman b/bin/repoman
index 7204f50dc..795c7ce77 100755
--- a/bin/repoman
+++ b/bin/repoman
@@ -393,6 +393,7 @@ qahelp={
"metadata.warning":"Warnings in metadata.xml files",
"portage.internal":"The ebuild uses an internal Portage function",
"virtual.oldstyle":"The ebuild PROVIDEs an old-style virtual (see GLEP 37)",
+ "virtual.suspect":"Ebuild contains a package that usually should be pulled via virtual/, not directly.",
"usage.obsolete":"The ebuild makes use of an obsolete construct",
"upstream.workaround":"The ebuild works around an upstream bug, an upstream bug should be filed and tracked in bugs.gentoo.org"
}
@@ -424,6 +425,7 @@ qawarnings = set((
"PDEPEND.suspect",
"RDEPEND.implicit",
"RDEPEND.suspect",
+"virtual.suspect",
"RESTRICT.invalid",
"ebuild.minorsyn",
"ebuild.badheader",
@@ -513,6 +515,13 @@ suspect_rdepend = frozenset([
"x11-misc/imake",
])
+suspect_virtual = {
+ "dev-util/pkg-config-lite":"virtual/pkgconfig",
+ "dev-util/pkgconf":"virtual/pkgconfig",
+ "dev-util/pkgconfig":"virtual/pkgconfig",
+ "dev-util/pkgconfig-openbsd":"virtual/pkgconfig",
+}
+
metadata_dtd_uri = 'http://www.gentoo.org/dtd/metadata.dtd'
# force refetch if the local copy creation time is older than this
metadata_dtd_ctime_interval = 60 * 60 * 24 * 7 # 7 days
@@ -1884,6 +1893,15 @@ for x in effective_scanlist:
is_blocker = atom.blocker
+ if catdir != "virtual":
+ if not is_blocker and \
+ atom.cp in suspect_virtual:
+ stats['virtual.suspect'] += 1
+ fails['virtual.suspect'].append(
+ relative_path +
+ ": %s: consider using '%s' instead of '%s'" %
+ (mytype, suspect_virtual[atom.cp], atom))
+
if mytype == "DEPEND" and \
not is_blocker and \
not inherited_java_eclass and \