diff mbox series

[v18,16/16] package_rpm.bbclass: filter pkgconfig() deps regardless of generator state

Message ID 20260826214548.3002838-17-sumanth.gavini@windriver.com
State New
Headers show
Series rpm: 4.20.1 -> 6.0.2 | expand

Commit Message

Sumanth Gavini Aug. 26, 2026, 9:45 p.m. UTC
__pkgconfig_provides/__pkgconfig_requires %{nil} don't reliably suppress
RPM 6's pkgconfig fileattr generator - confirmed via a cleansstate rebuild
of hicolor-icon-theme still showing "pkgconfig(default-icon-theme)" and
"/usr/bin/pkg-config" in the built package despite these defines. Most
likely because rpm's own fileattrs/pkgconfig.attr re-defines the same
macros later in the dependency-generation phase, after our --define has
already run, clobbering our override.

Add __requires_exclude/__provides_exclude on top of the existing
defines, as a final safety net: these filter the finished
Requires/Provides list in rpm's core dependency code rather than the
overridable fileattr scripts, so they take effect regardless of
whether the generator suppression above was actually honored.

Signed-off-by: Sumanth Gavini <sumanth.gavini@windriver.com>
---
 meta/classes-global/package_rpm.bbclass | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/meta/classes-global/package_rpm.bbclass b/meta/classes-global/package_rpm.bbclass
index 71d5c5dee3..5a88e3ec20 100644
--- a/meta/classes-global/package_rpm.bbclass
+++ b/meta/classes-global/package_rpm.bbclass
@@ -612,6 +612,8 @@  python do_package_rpm () {
     cmd = cmd + " --define '__rpm_lua_provides %{nil}'"
     cmd = cmd + " --define '__rpm_macro_provides %{nil}'"
     cmd = cmd + " --define '__usergroup_provides %{nil}'"
+    cmd = cmd + " --define '__requires_exclude ^pkgconfig\\(.*\\)$|^/usr/bin/pkg-config$'"
+    cmd = cmd + " --define '__provides_exclude ^pkgconfig\\(.*\\)$'"
     cmd = cmd + " --define '_unpackaged_files_terminate_build 0'"
     cmd = cmd + " --define 'debug_package %{nil}'"
     cmd = cmd + " --define '_tmppath " + workdir + "'"