From 291f5c2ed4b643fd99e18554a4599649ba971b2d Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sun, 18 Oct 2009 03:58:55 +0000 Subject: Bug #227225 - Add *DEPEND.badtilde warning for ~ operator used with non-zero revision. Thanks to David Leverton for this patch. (trunk r14629) svn path=/main/branches/2.1.7/; revision=14657 --- bin/repoman | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'bin') diff --git a/bin/repoman b/bin/repoman index 716a28334..d6214af24 100755 --- a/bin/repoman +++ b/bin/repoman @@ -295,6 +295,9 @@ qahelp={ "DEPEND.syntax":"Syntax error in DEPEND (usually an extra/missing space/parenthesis)", "RDEPEND.syntax":"Syntax error in RDEPEND (usually an extra/missing space/parenthesis)", "PDEPEND.syntax":"Syntax error in PDEPEND (usually an extra/missing space/parenthesis)", + "DEPEND.badtilde":"DEPEND uses the ~ dep operator with a non-zero revision part, which is useless (the revision is ignored)", + "RDEPEND.badtilde":"RDEPEND uses the ~ dep operator with a non-zero revision part, which is useless (the revision is ignored)", + "PDEPEND.badtilde":"PDEPEND uses the ~ dep operator with a non-zero revision part, which is useless (the revision is ignored)", "LICENSE.syntax":"Syntax error in LICENSE (usually an extra/missing space/parenthesis)", "PROVIDE.syntax":"Syntax error in PROVIDE (usually an extra/missing space/parenthesis)", "PROPERTIES.syntax":"Syntax error in PROPERTIES (usually an extra/missing space/parenthesis)", @@ -349,6 +352,7 @@ qawarnings = set(( "DEPEND.badmasked","RDEPEND.badmasked","PDEPEND.badmasked", "DEPEND.badindev","RDEPEND.badindev","PDEPEND.badindev", "DEPEND.badmaskedindev","RDEPEND.badmaskedindev","PDEPEND.badmaskedindev", +"DEPEND.badtilde", "RDEPEND.badtilde", "PDEPEND.badtilde", "DESCRIPTION.toolong", "KEYWORDS.dropped", "KEYWORDS.stupid", @@ -1502,6 +1506,14 @@ for x in scanlist: " not supported with EAPI='%s':" + \ " '%s'") % (mytype, eapi, atom)) + if atom.operator == "~" and \ + portage.versions.catpkgsplit(atom.cpv)[3] != "r0": + stats[mytype + '.badtilde'] += 1 + fails[mytype + '.badtilde'].append( + (relative_path + ": %s uses the ~ operator" + " with a non-zero revision:" + \ + " '%s'") % (mytype, atom)) + type_list.extend([mytype] * (len(badsyntax) - len(type_list))) for m,b in zip(type_list, badsyntax): -- cgit v1.2.3-1-g7c22