Bug 2360342

Summary: rpm transaction check sometimes fails with bogus missing dependencies
Product: [Fedora] Fedora Reporter: Fabio Valentini <decathorpe>
Component: rpmAssignee: Packaging Maintenance Team <packaging-team-maint>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: rawhideCC: asn, code, igor.raits, mdomonko, packaging-team-maint, pmatilai
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2025-05-12 09:00:41 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Fabio Valentini 2025-04-16 17:43:20 UTC
Since RPM 6.0 alpha landed in rawhide I started seeing very strange build failures, where installation of build dependencies failed during the *rpm transaction check* with missing dependencies, but looking at the build log, those dependencies were actually pulled in.

Two examples:

https://koschei.fedoraproject.org/build/20288268
https://koschei.fedoraproject.org/build/20288341

Both failed with errors like

Running transaction
Transaction failed: Rpm transaction failed.
Warning: skipped OpenPGP checks for 266 packages from repository: build
  - (crate(cfg_aliases/default) >= 0.1.1 with crate(cfg_aliases/default) < 0.2.0~) is needed by rust-nix0.28-devel-0.28.0-3.fc42.noarch
  - (crate(nix) >= 0.24.2 with crate(nix) < 0.25.0~) is needed by rust-argmax-devel-0.3.1-7.fc42.noarch
Child return code was: 1

Even though the packages providing these things were clearly downloaded before the transaction.

I can't see any pattern as to which packages are affected and which are not. The two examples (rust-fd-find and tuigreet) are just random Rust packages that don't do anything special.


Reproducible: Always

Comment 1 Panu Matilainen 2025-04-17 06:05:01 UTC
Hey, thanks for reporting, I'll look into this right away. In the meanwhile feel free to untag the build if its blocking or hindering your work.

I intended to be around when the alpha lands in rawhide to babysit for issues like this, but the build yesterday got stuck for hours and hours and I figured it would just not complete, and left for the day :(

Comment 2 Panu Matilainen 2025-04-17 07:48:16 UTC
Managed to reproduce locally, bisected down to https://github.com/rpm-software-management/rpm/commit/52f311e224254d7cb28bf2ced22db7b50e1a2653 so it's a refactoring error.

Since it's easy to do so, I'll just revert the patch until I've properly debugged it.

Comment 4 Andreas Schneider 2025-04-17 14:28:22 UTC
Thanks for fixing so quickly. How do we say at Samba: Untested code is broken code!

https://cmocka.org

;-)

Comment 5 Panu Matilainen 2025-04-22 12:33:08 UTC
We have the same motto in rpm. 

It's not that the rich dependency code isn't tested, this is a case that only triggers in some more complicated setting that I still haven't been able to reproduce outside the particular 200+ set of Rust packages that is involved here.

Comment 6 Panu Matilainen 2025-04-29 12:50:41 UTC
Proper fix in upstream since last week: https://github.com/rpm-software-management/rpm/pull/3729

Comment 7 Panu Matilainen 2025-05-12 09:00:41 UTC
And properly fixed now in rpm >= 5.99.90-5