Bug 2360342 - rpm transaction check sometimes fails with bogus missing dependencies
Summary: rpm transaction check sometimes fails with bogus missing dependencies
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: rpm
Version: rawhide
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Packaging Maintenance Team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2025-04-16 17:43 UTC by Fabio Valentini
Modified: 2025-05-12 09:00 UTC (History)
6 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2025-05-12 09:00:41 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

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


Note You need to log in before you can comment on or make changes to this bug.