Unreliable output
List packages that have no dependencies (like deborphan)
Brought to you by:
gerbier
OS: Fedora; Component: rpmorphan.noarch 1.17-3.fc28 @fedora
Some of the entries listed as output are currently used by the ir respective applications. Illustrations are e.g. libreoffice, libvirt.
$ rpmorphan
libcanberra-gtk2
libchamplain-gtk
libcryptui
liberation-sans-fonts
liberation-serif-fonts
libertas-usb8388-firmware
libproxy-mozjs
libreoffice-calc
libreoffice-emailmerge
libreoffice-gtk2
libreoffice-gtk3
libreoffice-help-en
libreoffice-help-fi
libreoffice-impress
libreoffice-langpack-fi
libreoffice-math
libreoffice-xsltfilter
libsane-hpaio
libsss_autofs
libsss_sudo
libvirt-daemon-config-network
libvirt-daemon-kvm
libvirt-gobject
You can have a very simple test to see if a package is orphan or not : rpm -e --test package
(it ask to rpm if it can remove the package) it will fail and tell if there is a required dependency to the package.
That last command as well appeared not to be reliable.; when involved along with a package which is not listed as part of the output resulting from command 'rpmorphan' , it returned an stdout output while obviously an stderr output would have been appropriate.
Case illustrated:
$
rpm -e --test libvirt-daemon-kvm$
$
rpm -e --test rpmorphan$
I just test it on my fedora 28 :
$ liste=$( rpmorphan )
$ for p in $liste ; do echo "--- $p ---" ; rpm -e --test $p; done
--- libXfont ---
--- liberation-mono-fonts ---
--- liberation-sans-fonts ---
--- liberation-serif-fonts ---
--- libertas-usb8388-firmware ---
--- libiptcdata ---
--- libosinfo ---
--- libreoffice-calc ---
--- libreoffice-emailmerge ---
--- libreoffice-gtk2 ---
--- libreoffice-gtk3 ---
--- libreoffice-help-fr ---
--- libreoffice-impress ---
--- libreoffice-langpack-fr ---
--- libreoffice-math ---
--- libreoffice-xsltfilter ---
--- libsmbios ---
--- libsss_autofs ---
--- libsss_sudo ---
all packages reported by rpmorphan command can be removed without any dependency problem. Otherside, you will have warning message like
$ rpm -e --test dracut
error: Failed dependencies:
dracut >= 046-7 is needed by (installed) kexec-tools-2.0.17-3.fc28.x86_64
dracut is needed by (installed) plymouth-scripts-0.9.3-9.fc28.x86_64
dracut = 048-1.fc28 is needed by (installed) dracut-network-048-1.fc28.x86_64
dracut = 048-1.fc28 is needed by (installed) dracut-config-rescue-048-1.fc28.x86_64
note : the rpmorphan command (without parameter) should return only orphaned libraries, but there is no easy way to filter only libraries package. To be fast and simple, the test filter is on package name , it works on all packages beginning by the the 'lib' pattern. This can explain why can see some packages as libreoffice-math
– Attachment is provided as object for comparison purpose – Current output and the one resulting from the folowing command are not identical, According to it, packages eligible for removing are:
$ LANG=C dnf list autoremove >dnf_list_autoremove_outputThe dnf output should be compared with "rpmorphan --all" command.
but rpmorphan does not know about the package you have installed manually :
it will report all packages without any required dependency.
It can be compared to rpmreaper tool (in fedora repository).
Unless you meant something else, it is then not aware of components – that belong to Fedora's repositories – installed using the function dnf, which is illustrated by the output resulting from the command:
rpmorphan does not know anything about dnf, it is just using rpm, so it can be used on any rpm based distribution : Centos, OpenSuse, Mageia ...
So finally that non-reliability was no more than an issue ; 'rpm -e --test rpmorphan' won't produce appropriatly an stderr output, which you provided 'error: Failed dependencies: (...)'. It means a fix is required.
I have to add some details : the "'rpm -e --test ' command is just used to validate rpmorphan output, it is not used in rpmorphan code (it is too slow).
If I had to guess; it's probably due to the extra data processing that involves the validation test procedure.
I just have an hint : by default rpmorphan just analyse rpm 'Requires' dependencies , but rpm can provides also Recommends and Suggests depencies (http://rpm.org/user_doc/dependencies.html). Rpmorphan can handle suggested package with the -suggests option, and I will add a --recommends option in next release.
Helpful command indeed. In 1955 it was an exception in European modern countries to work on Sundays; since then for far too many persons – including me sometimes – it’s common.
I recently used the
rpmorphanfunction. A pertinent investigation, which was not the case at the time i posted the present, indicated that it behaved as intended and thus, Unreliable output as title was non-founded. Instead it can be noticed that is has reliable output. Can at last me moved from [pending] to [closed].I must have been willing to announce a good news. Nonetheless it seems that an issue is alive.
Wouldn't it be relevant to calll either
rpm -e --testorrpm -q --whatrequiresin order to prevent packages having failed dependencies from being covered in queries.Last edit: Ricky Tigg 2023-03-08