Menu

#2 Unreliable output

1.0
pending
issue (2)
2023-03-08
2018-07-12
Ricky Tigg
No

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

Discussion

  • eric gerbier

    eric gerbier - 2018-07-13

    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.

     
  • eric gerbier

    eric gerbier - 2018-07-13
    • status: open --> pending
    • assigned_to: eric gerbier
     
  • Ricky Tigg

    Ricky Tigg - 2018-07-13

    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
    $

     
  • eric gerbier

    eric gerbier - 2018-07-13

    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

     
  • Ricky Tigg

    Ricky Tigg - 2018-07-13

    – 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_output

     
  • eric gerbier

    eric gerbier - 2018-07-14

    The 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).

     
  • Ricky Tigg

    Ricky Tigg - 2018-07-14

    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:

    $ sudo dnf history userinstalled
    anaconda-28.22.11-1.fc28.x86_64
    dracut-live-048-1.fc28.x86_64
    kernel-4.16.3-301.fc28.x86_64
    (...)
    
     
  • eric gerbier

    eric gerbier - 2018-07-15

    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 ...

     
  • Ricky Tigg

    Ricky Tigg - 2018-07-15

    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.

     
  • eric gerbier

    eric gerbier - 2018-07-16

    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).

     
  • Ricky Tigg

    Ricky Tigg - 2018-07-16

    If I had to guess; it's probably due to the extra data processing that involves the validation test procedure.

     
  • eric gerbier

    eric gerbier - 2018-07-22

    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.

     
  • Ricky Tigg

    Ricky Tigg - 2018-07-22

    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.

     
  • Ricky Tigg

    Ricky Tigg - 2023-03-08

    I recently used the rpmorphan function. 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].

     
  • Ricky Tigg

    Ricky Tigg - 2023-03-08

    I must have been willing to announce a good news. Nonetheless it seems that an issue is alive.

    $ rpmorphan -fullalgo -guess-all -package python-rpm-macros
    python-rpm-macros
    $ rpm -e --test python-rpm-macros
    error: Failed dependencies:
        (python-rpm-macros if rpm-build) is needed by (installed) python2.7-2.7.18-26.fc37.x86_64
     $ rpm -q --whatrequires python-rpm-macros
    python2.7-2.7.18-26.fc37.x86_64
    

    Wouldn't it be relevant to calll either rpm -e --test or rpm -q --whatrequires in order to prevent packages having failed dependencies from being covered in queries.

     

    Last edit: Ricky Tigg 2023-03-08

Log in to post a comment.

MongoDB Logo MongoDB