![](https://seccdn.libravatar.org/avatar/a4139df10120ce151e457fd1faff018d.jpg?s=120&d=mm&r=g)
On 2/9/22 17:29, Johannes Meixner wrote:
Hello,
On 2022-02-08 16:48, Martin Wilck wrote:
On Mon, 2022-02-07 at 15:33 +0100, Axel Braun wrote:
... zypper se -i --recommends works similar, and this is OK for a single packages, but is a bit difficult for nested dependencies.
AFAIK neither rpm nor zypper show nested deps. They can't be derived easily. running "zypper in" in a minimal container is probably the safest bet.
To show all directly required dependencies for an already installed RPM package I use
# rmp -e --test installed_package
Then one has to do that recursively for what was listed to get the transitive closure. In my experience this is the only reliably working way because rpm query commands only show some RPM data.
I don't know how to prove if an already installed RPM package is installed because it is required or because it is recommended. Perhaps when "rmp -e --test installed_package" does not list it as required by another package one can conclude it is installed because it is recommended.
This ignores the 3rd case which is a user could have chosen to install it manually, but yeah the rpm database doesn't track the reason why a package was installed. This is why things like uninstalling a pattern don't really do anything meaningful, we simply don't have the info available. -- Simon Lees (Simotek) http://simotek.net Emergency Update Team keybase.io/simotek SUSE Linux Adelaide Australia, UTC+10:30 GPG Fingerprint: 5B87 DB9D 88DC F606 E489 CEC5 0922 C246 02F0 014B