Bug 2164378
| Summary: | dnf5 does not order transactions | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Pavel Raiskup <praiskup> |
| Component: | dnf5 | Assignee: | Marek Blaha <mblaha> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | |
| Severity: | high | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 38 | CC: | amatej, extras-qa, jkolarik, mblaha, ngompa13, nsella, packaging-team-maint, pkratoch, pmatilai, pmoravco, praiskup, rpm-software-management, vmukhame, zbyszek |
| Target Milestone: | --- | Keywords: | Triaged |
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | 2055033 | Environment: | |
| Last Closed: | 2023-08-29 06:48:01 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | 2055033 | ||
| Bug Blocks: | 2018913 | ||
|
Description
Pavel Raiskup
2023-01-25 12:01:33 UTC
Panu is right, that DNF4 behaves correctly in this case, and that /bin/sh is an implicit Requires(pre) thing if %pre is used. This blocks the Mock+DNF5 experiments: https://github.com/rpm-software-management/mock/pull/1027 [pmatilai🎩︎localhost dnf5]$ find -name "*.cpp"|xargs grep rpmtsOrder [pmatilai🎩︎localhost dnf5]$ It seems to me dnf5 is not calling rpmtsOrder() at all. Which means the packages get installed rougly in the order they got added to the transaction, which is very nearly guaranteed to be totally wrong. Rpm API is stupid here, it should automatically do this stuff but doesn't. So, any API user needs to call rpmtsOrder() before rpmtsRun() or things will be terribly, horribly broken. Just to test something else and to confirm: > # ./dnf5 --installroot /srv/test/ --releasever 38 install python3 > [...] > Running transaction > [1/2] Verify package files 100% | 216.0 B/s | 63.0 B | 00m00s > >>> Running pre-transaction scriptlet: filesystem-0:3.18-2.fc37.x86_64 > >>> Stop pre-transaction scriptlet: filesystem-0:3.18-2.fc37.x86_64 > [2/3] Prepare transaction 100% | 1.0 KiB/s | 63.0 B | 00m00s > [3/4] Installing python3-0:3.11.1-3.fc3 100% | 460.9 KiB/s | 34.6 KiB | 0 [...] > [65/65] Installing fedora-repos-rawhide 100% | 1.4 KiB/s | 2.4 KiB | 00m02s So whenver there are dependencies, the explicitly requested thing should be the last item to be installed, or nearly so. Thanks Panu for investigation! You are completely right. I've created this PR that should fix the issue: https://github.com/rpm-software-management/dnf5/pull/250 This bug appears to have been reported against 'rawhide' during the Fedora Linux 38 development cycle. Changing version to 38. |