Question to show-installed

Jan Silhan jsilhan at redhat.com
Tue Mar 10 10:13:07 UTC 2015


> From: "Harald Heigl" <Harald.Heigl1000+yumdevel at gmail.com>

> I've a question concerning show-installed (from yum-utils). This seems
> perfect to me to get a comprehensive list of all packages.
> As far as I can see it uses returnLeafNodes() which works for most cases,
> I've found just one point where it doesn't work as expected. (in my opinion)

Currently DNF does not have any method in API to be able to do that. The returnLeafNodes
does not exist in DNF.

Questions for you:
Do you want to switch from yum to DNF (note DNF is only in EPEL7 and F18+ repos)?
Do you need to list just packages and not installed groups?

If you wanna switch to DNF and have the function for that there, then file an RFE [1],
setup some COPR repo with packages having circular dependencies and describe expected
result. There is a function in libsolv for listing unneeded packages, so we can try
that and eventually expose it to DNF API.

> I have two packages (or perhaps some more) which reference each other
> (circular reference), neither of them is shown up in this list, because they
> are both no leaf-node. How would I adjust show-installed the best way? I've
> thought about implementing something similar what "repoquery --installed
> --whatrequires --recursive" does and looking for a self reference in there
> and adding found packages to the list.
> 
> But I think this would have great impact on performance of the script, are
> there any better ways? A build-in function, another yum-util, which could
> list circular referenced packages?

try `dnf list installed` AFAIK it should print all installed packages no matter
if they are leafs or not.

[1] https://bugzilla.redhat.com/enter_bug.cgi?product=Fedora&component=dnf

Honza


More information about the Yum-devel mailing list