On Tue, 20 Aug 2024 11:27:34 -0400, "Xu Zhao" <i@xuzhao.net> wrote:
I recently ran a couple of dependency analysis on openSUSE RPM packages, and found it unintuitive that the RPM package dependency graph is not a DAG (Directed Acyclic Graph). Instead there are dependency cycles between them, for example:
$ rpm -q --requires terminfo-base | grep ncurses ncurses >= 6.5.20240713
$ rpm -q --requires libncurses6|grep terminfo terminfo-base
To elaborate the dependency loop you have shown, all together here, and starting with ncurses: $ zypper se -x --provides ncurses Loading repository data... Reading installed packages... S | Name | Summary | Type ---+-------------+--------------------------+-------- | libncurses5 | Terminal control library | package i | libncurses6 | Terminal control library | package $ rpm -q libncurses6 --provides |grep -w ncurses ncurses = 6.5.20240817 $ rpm -q libncurses6 --requires |grep -w terminfo-base terminfo-base $ zypper se -x --provides terminfo-base Loading repository data... Reading installed packages... S | Name | Summary | Type ---+---------------+----------------------------------+-------- i | terminfo-base | A terminal descriptions database | package $ rpm -q terminfo-base --provides |grep -w terminfo-base config(terminfo-base) = 6.5.20240817-43.1 terminfo-base = 6.5.20240817-43.1 terminfo-base(x86-64) = 6.5.20240817-43.1 $ rpm -q terminfo-base --requires |grep -w ncurses ncurses >= 6.5.20240817 The purpose of this last spec is not really to express a dependency of terminfo-base on ncurses, is it? It is to exclude any ncurses version less than 6.5.20240817 because terminfo-base is not guaranteed to work with it, right? Instead of terminfo-base Requires 'ncurses >= 6.5.20240817', could it be specified as terminfo-base Conflicts with 'ncurses < 6.5.20240817' ? Rpm does not use Conflicts dependencies for ordering, so there would be no loop anymore. [1]
$ rpm -q --requires sonnet libKF5SonnetCore.so.5()(64bit) $ rpm -q --requires libKF5SonnetCore5 sonnet >= 5.116.0
This looks like the same situation as with ncurses and terminfo-base. [1] https://rpm-software-management.github.io/rpm/manual/tsort.html -- Robert Webb