aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2012-06-17 08:42:51 (GMT)
committerZac Medico <zmedico@gentoo.org>2012-06-17 15:45:01 (GMT)
commit4cd3da7f48b74abfc48d36cf2c700c4eebfcbb40 (patch)
treee14799850cf505a9e429627f7bd03e4def479d13
parentgrabfile_package: show real file name in error (diff)
downloadportage-4cd3da7f48b74abfc48d36cf2c700c4eebfcbb40.zip
portage-4cd3da7f48b74abfc48d36cf2c700c4eebfcbb40.tar.gz
portage-4cd3da7f48b74abfc48d36cf2c700c4eebfcbb40.tar.bz2
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>
-rwxr-xr-xbin/repoman18
-rw-r--r--man/repoman.14
2 files changed, 22 insertions, 0 deletions
diff --git a/bin/repoman b/bin/repoman
index 7204f50..795c7ce 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 \
diff --git a/man/repoman.1 b/man/repoman.1
index 26575a9..b8c0f48 100644
--- a/man/repoman.1
+++ b/man/repoman.1
@@ -382,6 +382,10 @@ Ebuild uses D, ROOT, ED, EROOT or EPREFIX with helpers
The ebuild PROVIDEs an old-style virtual (see GLEP 37). This is an error
unless "allow\-provide\-virtuals = true" is set in metadata/layout.conf.
.TP
+.B virtual.suspect
+Ebuild contains a package that usually should be pulled via virtual/,
+not directly.
+.TP
.B wxwidgets.eclassnotused
Ebuild DEPENDs on x11-libs/wxGTK without inheriting wxwidgets.eclass. Refer to
bug #305469 for more information.