commit:     8b934057b7cd08365ef395be8599840f183bf2e8
Author:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
AuthorDate: Sat Feb 22 08:29:58 2025 +0000
Commit:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Sat Feb 22 08:29:58 2025 +0000
URL:        
https://gitweb.gentoo.org/proj/pkgcore/pkgcheck.git/commit/?id=8b934057

RequiredUseDefaults: skip all USE flags with prefix "cpu_flags_"

Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>

 src/pkgcheck/checks/metadata.py | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/pkgcheck/checks/metadata.py b/src/pkgcheck/checks/metadata.py
index c81c5b09..e375ba1f 100644
--- a/src/pkgcheck/checks/metadata.py
+++ b/src/pkgcheck/checks/metadata.py
@@ -436,21 +436,21 @@ class RequiredUseCheck(Check):
                     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):

Reply via email to