Make the USE=test RDEPEND check (bug #236786) also apply to PDEPEND.
authorZac Medico <zmedico@gentoo.org>
Mon, 3 Aug 2009 22:27:31 +0000 (22:27 -0000)
committerZac Medico <zmedico@gentoo.org>
Mon, 3 Aug 2009 22:27:31 +0000 (22:27 -0000)
svn path=/main/trunk/; revision=13882

bin/repoman

index 97f24ccd2598e581ad86d7e3fb6289bc3a10c77d..6569cc36460cf27751b1ade831d4622c0ad9b67e 100755 (executable)
@@ -1411,10 +1411,11 @@ for x in scanlist:
                                for token in mydepstr.split():
                                        if token in operator_tokens or \
                                                token[-1:] == "?":
-                                               if token == "test?" and mytype == "RDEPEND":
-                                                       stats['RDEPEND.suspect'] += 1
-                                                       fails['RDEPEND.suspect'].append(relative_path + \
-                                                               ": 'test?' USE conditional in RDEPEND")
+                                               if token == "test?" and \
+                                                       mytype in ("RDEPEND", "PDEPEND"):
+                                                       stats[mytype + '.suspect'] += 1
+                                                       fails[mytype + '.suspect'].append(relative_path + \
+                                                               ": 'test?' USE conditional in %s" % mytype)
                                                continue
                                        try:
                                                atom = portage.dep.Atom(token)