Am 23.08.24 um 20:03 schrieb Neal Gompa:
On Fri, Aug 23, 2024 at 1:57 PM Andrei Borzenkov <arvidjaar@gmail.com> wrote:
On 21.08.2024 16:29, Xu Zhao wrote:
Hi Andrei,
"ncurses" is not a package name, but a capability. libncurses6 is the only package the provides this capability:
``` $ rpm -q --whatprovides ncurses libncurses6-6.5.20240713-41.1.x86_64 ```
You are right. Well, rpm knows there is a loop:
warning: 1 Strongly Connected Components warning: SCC #1: 2 members (3 external dependencies) warning: libncurses6-6.5.20240810-42.1.x86_64 warning: -> terminfo-base-6.5.20240810-42.1.x86_64 warning: terminfo-base-6.5.20240810-42.1.x86_64 warning: -> libncurses6-6.5.20240810-42.1.x86_64
and according to documentation
Packages belonging to a dependency loop are installed as a consecutive group
so it appears rpm attempts best effort to install them. As long as packages do not really need each other during installation it should work.
OrderWithRequires is the stanza that lets you identify dependency ordering in package transactions. It was introduced in RPM 4.9.0 and was documented as such:
Packages can now supply extra transaction ordering hints via OrderWithRequires tag. This follows Requires tag syntax, but does not generate actual dependencies. Only if the involved packages are present in the same transaction, the ordering hints are treated as if they were Requires when calculating the transaction order.
But this doesn't allow you to break ordering cycles, right? OrderWithRequires has exactly the same effect on transaction order as Requires. Their difference, which is not relevant here, is that OrderWithRequires doesn't create an actual dependency. (In systemd terminology, it is just After, while rpm Requires is Requires + After.) The manual suggests [1] dependency qualifiers [2] to break cycles. Some qualifiers like {pre,post}{,un} make a dependency "stronger", so that it's favored over other dependencies in a cycle, others like {pre,post}trans, verify, and meta make it weaker, in fact such dependencies don't affect transaction ordering at all. Aaron [1] <https://rpm-software-management.github.io/rpm/manual/tsort.html> [2] <https://rpm-software-management.github.io/rpm/manual/spec.html#Requires>