From 7f86c79068be1c83303da30f5f4f030080e6326a Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Sat, 4 Nov 2017 02:24:30 +0100 Subject: [PATCH] Ignore useless-provides on debuginfo provides (#112) Also flip to set's rather than lists as the main operation here is lookup, so set()s should be faster. --- TagsCheck.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/TagsCheck.py b/TagsCheck.py index a8d87aa..dc890b1 100644 --- a/TagsCheck.py +++ b/TagsCheck.py @@ -823,11 +823,13 @@ class TagsCheck(AbstractCheck.AbstractCheck): # TODO: should take versions, <, <=, =, >=, > into account here # https://bugzilla.redhat.com/460872 - useless_provides = [] + useless_provides = set() for p in prov_names: - if prov_names.count(p) != 1 and p not in useless_provides: - useless_provides.append(p) - for p in useless_provides: + if (prov_names.count(p) != 1 and + not p.startswith('debuginfo(') and + p not in useless_provides): + useless_provides.add(p) + for p in sorted(useless_provides): printError(pkg, 'useless-provides', p) for p in pkg.provides(): -- 2.17.0