Bug #236786 - Warn about 'test?' USE conditionals in RDEPEND. Thanks to
authorZac Medico <zmedico@gentoo.org>
Sun, 28 Jun 2009 18:24:23 +0000 (18:24 -0000)
committerZac Medico <zmedico@gentoo.org>
Sun, 28 Jun 2009 18:24:23 +0000 (18:24 -0000)
Markus Meier <maekke@gentoo.org> for this patch.

svn path=/main/trunk/; revision=13724

bin/repoman

index 41c811039f7e659789b35ea058d4cb00178211b3..09b79da2351758ca8f78329eb9f7b1da395ed3ad 100755 (executable)
@@ -1404,7 +1404,11 @@ for x in scanlist:
                        if mytype in ("DEPEND", "RDEPEND", "PDEPEND"):
                                for token in mydepstr.split():
                                        if token in operator_tokens or \
-                                               token.endswith("?"):
+                                               token[-1:] == "?":
+                                               if token == "test?" and mytype == "RDEPEND":
+                                                       stats['RDEPEND.suspect'] += 1
+                                                       fails['RDEPEND.suspect'].append(relative_path + \
+                                                               ": 'test?' USE conditional in RDEPEND")
                                                continue
                                        try:
                                                atom = portage.dep.Atom(token)