Skip to content

Commit

Permalink
RequiredUseDefaults: skip all USE flags with prefix "cpu_flags_"
Browse files Browse the repository at this point in the history
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
  • Loading branch information
arthurzam committed Feb 22, 2025
1 parent 9755827 commit 8b93405
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/pkgcheck/checks/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -436,21 +436,21 @@ def feed(self, pkg):
src = FakeConfigurable(pkg, profile)
for node in pkg.required_use.evaluate_depset(src.use):
if not node.match(src.use):
failures[node].append((src.use, profile.key, profile.name))
use_flag = str(node)
if not use_flag.startswith("cpu_flags_"):
failures[use_flag].append((src.use, profile.key, profile.name))

if self.options.verbosity > 0:
# report all failures with profile info in verbose mode
for node, profile_info in failures.items():
for use, keyword, profile in profile_info:
yield RequiredUseDefaults(str(node), sorted(use), keyword, profile, pkg=pkg)
yield RequiredUseDefaults(node, sorted(use), keyword, profile, pkg=pkg)
else:
# only report one failure per REQUIRED_USE node in regular mode
for node, profile_info in failures.items():
num_profiles = len(profile_info)
_use, _keyword, profile = profile_info[0]
yield RequiredUseDefaults(
str(node), profile=profile, num_profiles=num_profiles, pkg=pkg
)
yield RequiredUseDefaults(node, profile=profile, num_profiles=num_profiles, pkg=pkg)


class UnusedLocalUse(results.PackageResult, results.Warning):
Expand Down

0 comments on commit 8b93405

Please sign in to comment.