diff mbox series

[v15,12/12] lib/oe/package_manager/rpm: Enable DNF filelists to resolve file deps

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

Commit Message

Gavini, Sumanth Aug. 16, 2026, 11:11 p.m. UTC
With rpm 6's internal dependency generator now active in OE builds,
pkgconfigdeps.sh --requires always emits "Requires: /usr/bin/pkg-config"
for any package that ships .pc files.  This line is emitted before
pkg-config is even called, so packages built during the early rpm 6
migration (before the PKG_CONFIG_SYSROOT_DIR fix) carry this requirement
even though they have no pkgconfig() Provides.

DNF only reads primary.xml by default, which holds explicit Provides
declarations.  pkgconf now has RPROVIDES += "/usr/bin/pkg-config", but
pkgconf packages fetched from the hash-equivalence sstate server were
built before that change and have no explicit Provides in primary.xml.

createrepo_c already generates filelists.xml by default.  Enabling
optional_metadata_types=filelists tells DNF to also load it, so DNF
can match "Requires: /usr/bin/pkg-config" against pkgconf's actual
installed file list regardless of when pkgconf was built.  This covers
the sstate transition period without requiring a full rebuild of
pkgconf.

Signed-off-by: Sumanth Gavini <sumanth.gavini@windriver.com>
---
 meta/lib/oe/package_manager/rpm/__init__.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/meta/lib/oe/package_manager/rpm/__init__.py b/meta/lib/oe/package_manager/rpm/__init__.py
index 1d831745ff..cd6efe3d3b 100644
--- a/meta/lib/oe/package_manager/rpm/__init__.py
+++ b/meta/lib/oe/package_manager/rpm/__init__.py
@@ -318,7 +318,8 @@  class RpmPM(PackageManager):
                              "-c", oe.path.join(self.target_rootfs, "etc/dnf/dnf.conf"),
                              "--setopt=reposdir=%s" %(oe.path.join(self.target_rootfs, "etc/yum.repos.d")),
                              "--installroot=%s" % (self.target_rootfs),
-                             "--setopt=logdir=%s" % (self.d.getVar('T'))
+                             "--setopt=logdir=%s" % (self.d.getVar('T')),
+                             "--setopt=optional_metadata_types=filelists",
                             ]
         if hasattr(self, "rpm_repo_dir"):
             standard_dnf_args.append("--repofrompath=oe-repo,%s" % (self.rpm_repo_dir))