Created attachment 1716714 [details] debugdata archive Description of problem: Hi there, this bug is against centos 8.2.2004. I used the bug reporting link from the dnf wiki to get here. The issue we are seeing is a dnf erase is causing a package marked as user installed to be removed as an unneeded package. In this case it is uninstalling python36. If we dnf erase they python3-pip package, dnf is removing python36 as well. Version-Release number of selected component (if applicable): libsolv-0.7.7-1.el8.x86_64 package hawkey is not installed dnf-4.2.17-7.el8_2.noarch How reproducible: Every time Steps to Reproduce: 1. dnf -v -y install make automake gcc gcc-c++ kernel-devel selinux-policy-targeted libffi-devel iptables sos ethtool rng-tools acl psmisc redhat-lsb-core rsync python3-libselinux socat git irqbalance curl platform-python-devel rsyslog keepalived openssl-devel kernel redhat-rpm-config openssh-server policycoreutils-python-utils at dbus less python36 which traceroute dhcp-client initscripts man-pages iputils dracut haproxy audit selinux-policy bash-completion python3-pip tcpdump NetworkManager gawk openssh-clients lsof python3-virtualenv dracut-config-generic ipvsadm nmap-ncat cloud-init grubby python3-policycoreutils logrotate network-scripts cryptsetup ca-certificates net-tools 2.dnf mark install make automake gcc gcc-c++ kernel-devel selinux-policy-targeted libffi-devel iptables sos ethtool rng-tools acl psmisc redhat-lsb-core rsync python3-libselinux socat git irqbalance curl platform-python-devel rsyslog keepalived openssl-devel kernel redhat-rpm-config openssh-server policycoreutils-python-utils at dbus less python36 which traceroute dhcp-client initscripts man-pages iputils dracut haproxy audit selinux-policy bash-completion python3-pip tcpdump NetworkManager gawk openssh-clients lsof python3-virtualenv dracut-config-generic ipvsadm nmap-ncat cloud-init grubby python3-policycoreutils logrotate network-scripts cryptsetup ca-certificates net-tools 3.dnf -v -y --debugsolver erase linux-firmware-whence linux-firmware platform-python-devel make automake gcc gcc-c++ kernel-devel openssl-devel python3-pip libffi-devel Actual results: > Erasing : python36-3.6.8-2.module_el8.1.0+245+c39af44f.x86_6 4/68 Expected results: We would expect python36 to be left on the system as it was marked user installed. Additional info: This was found when using the OpenStack diskimage-builder tool to create a centos 8 image. Attached is the debugdata and the log from our image build output. Note, the tool moves in and out of a chroot environment during the build process, so if you aren't familiar with the tool that can be confusing in the logs. The dnf runs in question are inside the chroot. Also of note, I ran "dnf repoquery --userinstalled" just prior to the erase call in question to confirm the status of the package. That output starts at 2020-09-25 20:17:04.598 in the log.
Created attachment 1716715 [details] log output from the image build run
DNF is correct on the removal of python36 package as this package requires python3-pip which is about to be removed: # dnf repoquery --requires python36 /bin/sh /usr/libexec/platform-python /usr/sbin/alternatives python3-pip python3-setuptools And according to documentation `dnf remove` "Removes the specified packages from the system along with any packages depending on the packages being removed.". (See https://dnf.readthedocs.io/en/latest/command_ref.html#remove-command) On the other hand listing python36 package among "Removing unused dependencies:" list is misleading. python36 indeed is a dependency of python3-pip but being "dependent package" is more important in this context. So I think the scope of the bug should not be removal of (user installed) package itself but rather reporting it as an "unused dependency".
This message is a reminder that Fedora 31 is nearing its end of life. Fedora will stop maintaining and issuing updates for Fedora 31 on 2020-11-24. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '31'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 31 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
This bug appears to have been reported against 'rawhide' during the Fedora 34 development cycle. Changing version to 34.
This message is a reminder that Fedora Linux 34 is nearing its end of life. Fedora will stop maintaining and issuing updates for Fedora Linux 34 on 2022-06-07. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a 'version' of '34'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, change the 'version' to a later Fedora Linux version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora Linux 34 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora Linux, you are encouraged to change the 'version' to a later version prior to this bug being closed.
Fedora Linux 34 entered end-of-life (EOL) status on 2022-06-07. Fedora Linux 34 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. Thank you for reporting this bug and we are sorry it could not be fixed.