public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Zac Medico" <zmedico@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/portage:master commit in: man/, bin/
Date: Sun, 17 Jun 2012 15:46:07 +0000 (UTC)	[thread overview]
Message-ID: <1339947901.4cd3da7f48b74abfc48d36cf2c700c4eebfcbb40.zmedico@gentoo> (raw)

commit:     4cd3da7f48b74abfc48d36cf2c700c4eebfcbb40
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sun Jun 17 08:42:51 2012 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sun Jun 17 15:45:01 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=4cd3da7f

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 <AT> gentoo.org>

---
 bin/repoman   |   18 ++++++++++++++++++
 man/repoman.1 |    4 ++++
 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.



             reply	other threads:[~2012-06-17 15:46 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-17 15:46 Zac Medico [this message]
  -- strict thread matches above, loose matches on Subject: below --
2019-08-30 17:05 [gentoo-commits] proj/portage:master commit in: man/, bin/ Zac Medico
2013-08-22  4:06 Zac Medico
2013-08-22  2:01 Zac Medico
2013-08-04 20:51 Zac Medico
2013-07-23 20:42 Arfrever Frehtes Taifersar Arahesis
2013-07-13  9:35 Arfrever Frehtes Taifersar Arahesis
2013-05-18 18:47 Zac Medico
2013-04-28 22:06 Zac Medico
2012-10-31 21:32 Zac Medico
2012-10-11  3:10 Zac Medico
2012-09-24 20:26 Zac Medico
2012-09-24  3:47 Mike Frysinger
2012-03-17 21:33 Zac Medico
2012-03-11  2:56 Mike Frysinger
2012-03-11  2:44 Mike Frysinger
2012-01-02  7:48 Zac Medico
2011-12-22 23:43 Zac Medico
2011-12-21 20:08 Zac Medico
2011-12-21 20:04 Zac Medico
2011-10-17  4:22 Zac Medico
2011-10-14 18:06 Zac Medico
2011-08-31  3:05 Zac Medico
2011-08-13 13:52 Zac Medico
2011-08-11  3:00 Zac Medico
2011-06-24 10:23 Zac Medico
2011-05-01 15:58 Zac Medico
2011-05-01 14:52 Arfrever Frehtes Taifersar Arahesis
2011-05-01  1:23 Arfrever Frehtes Taifersar Arahesis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1339947901.4cd3da7f48b74abfc48d36cf2c700c4eebfcbb40.zmedico@gentoo \
    --to=zmedico@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox