# rpm -q dnf python3-dnf-plugins-extras-leaves samba-common dnf-1.1.4-2.fc23.noarch python3-dnf-plugins-extras-leaves-0.0.12-1.fc23.noarch samba-common-4.3.3-0.fc23.noarch # rpm -e --test samba-common (no output) # dnf leaves | grep samba samba-client-2:4.3.3-0.fc23.x86_64 samba-common-2:4.3.3-0.fc23.noarch # grep clean /etc/dnf/dnf.conf clean_requirements_on_remove=False So, current up to date F23, nothing requires samba-common so it should be good to remove, and dnf is not set to clean deps on remove. However, it tries to remove a bunch of other stuff. I'm not sure if clean_requirements_on_remove=False works -- it used to work at least sometime, but maybe it was broken in 1.1.4 (see "Finding unneeded leftover dependencies" in the output)? # dnf --noplugins -d 10 remove samba-common timer: config: 5 ms cachedir: /var/cache/dnf DNF version: 1.1.4 Command: dnf Installroot: / Releasever: 23 Base command: remove Extra commands: ['samba-common'] timer: sack setup: 7 ms --> Starting dependency resolution --> Finding unneeded leftover dependencies ---> Package cifs-utils.x86_64 6.4-4.fc23 will be erased ---> Package control-center.x86_64 1:3.18.2-1.fc23 will be erased ---> Package gdm.x86_64 1:3.18.2-1.fc23 will be erased ---> Package gnome-classic-session.noarch 3.18.2-1.fc23 will be erased ---> Package gnome-initial-setup.x86_64 3.18.0-1.fc23 will be erased ---> Package gnome-shell.x86_64 3.18.3-1.fc23 will be erased ---> Package gnome-shell-extension-alternate-tab.noarch 3.18.2-1.fc23 will be erased ---> Package gnome-shell-extension-apps-menu.noarch 3.18.2-1.fc23 will be erased ---> Package gnome-shell-extension-background-logo.noarch 3.18.0-1.fc23 will be erased ---> Package gnome-shell-extension-common.noarch 3.18.2-1.fc23 will be erased ---> Package gnome-shell-extension-launch-new-instance.noarch 3.18.2-1.fc23 will be erased ---> Package gnome-shell-extension-places-menu.noarch 3.18.2-1.fc23 will be erased ---> Package gnome-shell-extension-window-list.noarch 3.18.2-1.fc23 will be erased ---> Package gvfs-smb.x86_64 1.26.2-1.fc23 will be erased ---> Package libsmbclient.x86_64 2:4.3.3-0.fc23 will be erased ---> Package libwbclient.x86_64 2:4.3.3-0.fc23 will be erased ---> Package pulseaudio-gdm-hooks.x86_64 7.1-1.fc23 will be erased ---> Package samba-client.x86_64 2:4.3.3-0.fc23 will be erased ---> Package samba-client-libs.x86_64 2:4.3.3-0.fc23 will be erased ---> Package samba-common.noarch 2:4.3.3-0.fc23 will be erased ---> Package samba-common-libs.x86_64 2:4.3.3-0.fc23 will be erased --> Finished dependency resolution timer: depsolve: 116 ms Dependencies resolved. =================================================================================== Package Arch Version Repository Size =================================================================================== Removing: cifs-utils x86_64 6.4-4.fc23 @koji-override-0 175 k control-center x86_64 1:3.18.2-1.fc23 @updates 18 M gdm x86_64 1:3.18.2-1.fc23 @updates 3.3 M gnome-classic-session noarch 3.18.2-1.fc23 @updates 194 k gnome-initial-setup x86_64 3.18.0-1.fc23 @koji-override-0 2.1 M gnome-shell x86_64 3.18.3-1.fc23 @updates 9.3 M gnome-shell-extension-alternate-tab noarch 3.18.2-1.fc23 @updates 9.4 k gnome-shell-extension-apps-menu noarch 3.18.2-1.fc23 @updates 26 k gnome-shell-extension-background-logo noarch 3.18.0-1.fc23 @koji-override-0 56 k gnome-shell-extension-common noarch 3.18.2-1.fc23 @updates 545 k gnome-shell-extension-launch-new-instance noarch 3.18.2-1.fc23 @updates 4.9 k gnome-shell-extension-places-menu noarch 3.18.2-1.fc23 @updates 23 k gnome-shell-extension-window-list noarch 3.18.2-1.fc23 @updates 56 k gvfs-smb x86_64 1.26.2-1.fc23 @updates 92 k libsmbclient x86_64 2:4.3.3-0.fc23 @updates 156 k libwbclient x86_64 2:4.3.3-0.fc23 @updates 70 k pulseaudio-gdm-hooks x86_64 7.1-1.fc23 @updates 354 samba-client x86_64 2:4.3.3-0.fc23 @updates 1.7 M samba-client-libs x86_64 2:4.3.3-0.fc23 @updates 18 M samba-common noarch 2:4.3.3-0.fc23 @updates 119 k samba-common-libs x86_64 2:4.3.3-0.fc23 @updates 273 k Transaction Summary =================================================================================== Remove 21 Packages Installed size: 54 M Is this ok [y/N]: Operation aborted. Cleaning up.
Thanks for the report. Please, provide debugdata [1]. Have you noticed this regression in previous DNF version too? [1] https://github.com/rpm-software-management/dnf/wiki/Bug-Reporting#dependency-resolution-problem
Created attachment 1108985 [details] debugdata This is the first version that I've noticed the problem with. But I cannot say for sure it hasn't been there in some older versions versions.
The problem is : rpm -q libsmbclient --requires | grep samba-common samba-common = 2:4.3.4-1.fc23 rpm -q samba --requires | grep samba-common samba-common = 2:4.3.4-1.fc23 That is the difference between dnf and rpm . when libsmbclient and samba does not require samba-common etc should have the same results . 1- Of course, libsmbclient and samba shouldn't require samba-common . 2- if packages have the requires , rpm should obey , but don't , so for me is a bug in rpm .
(In reply to Sergio Monteiro Basto from comment #3) > The problem is : I don't see any problem in that comment. But anyway: 1) I don't have samba installed so that's not relevant to my scenario. 2) The dependency on samba-common in libsmbclient is a "Requires(pre)", so it should not prevent removal of samba-common because the %pre scriptlet of libsmbclient has obviously been run as both packages are already installed. And it doesn't prevent removal with rpm, but apparently does with dnf, hence it's an issue with dnf (but not sure if it's a generic one or just clean_requirements_on_remove thing).
(In reply to Ville Skyttä from comment #4) > (In reply to Sergio Monteiro Basto from comment #3) > > The problem is : > I don't see any problem in that comment. But anyway: > 1) I don't have samba installed so that's not relevant to my scenario. > > 2) The dependency on samba-common in libsmbclient is a "Requires(pre)", That is the problem/bug the rpm --requires of libsmbclient have samba-common included, should be that, that confuses dnf . How do you know that is a "Requires(pre)" ? have you any command that show that or you watch on spec file ? > so > it should not prevent removal of samba-common because the %pre scriptlet of > libsmbclient has obviously been run as both packages are already installed. Correct > And it doesn't prevent removal with rpm, but apparently does with dnf, hence > it's an issue with dnf (but not sure if it's a generic one or just > clean_requirements_on_remove thing). Seems to me that dnf difference to yum is just when we got "Requires(pre)" .
(In reply to Sergio Monteiro Basto from comment #5) > How do you know that is a "Requires(pre)" ? have you any command that show > that or you watch on spec file ? I suppose a command or some rpm query formatting to getfor that exists as well, but I'm not aware of it, I'm just looking at the specfile. So, maybe we're looking at two bugs here: 1) The incorrect behavior with Requires(pre) and friends, and 2) The debug output which says "--> Finding unneeded leftover dependencies" even when clean_requirements_on_remove is False and it in fact is not (or should not) be finding those in that case. Maybe it's not actually doing that and just the confusing message should be removed.
reported in libsolv: https://github.com/openSUSE/libsolv/issues/126
*** Bug 1310840 has been marked as a duplicate of this bug. ***
See also: https://bugzilla.redhat.com/show_bug.cgi?id=1284349
Meaning of Requires(pre) in email https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/NGPJMDUVEW65TQSD262G6OQF6P6LWWRM/ it emphasizes that this is a bug: Any package that is specified in `Requires(pre)` could be freely removed after installation.
*** Bug 1239322 has been marked as a duplicate of this bug. ***
This package has changed ownership in the Fedora Package Database. Reassigning to the new owner of this component.
Created attachment 1180540 [details] dnf remove gstreamer1-plugins-base Were there any changes in this regard? Current list taken from rawhide regarding bug #1310840 seems a bit different (different packages involved) but still quite big.
commit 6afc1750d97d0297cb397278c20b962bc3b24209 Author: Michael Schroeder <mls> Date: Thu Apr 7 17:09:14 2016 +0200 Implement filtering of Requires(pre,post) for installed packages Should fix issue#126. Except that we need to support it in the testcases as well. Looks like this has been fixed. If not - reopen please.
(In reply to Igor Gnatenko from comment #14) > commit 6afc1750d97d0297cb397278c20b962bc3b24209 > Author: Michael Schroeder <mls> > Date: Thu Apr 7 17:09:14 2016 +0200 > > Implement filtering of Requires(pre,post) for installed packages > > Should fix issue#126. Except that we need to support it in > the testcases as well. > > > Looks like this has been fixed. If not - reopen please. This patch landed in libsolv 0.6.20, right? Previous report was made with libsolv-0.6.22-1.fc25.x86_64.
(In reply to srakitnican from comment #15) > (In reply to Igor Gnatenko from comment #14) > > commit 6afc1750d97d0297cb397278c20b962bc3b24209 > > Author: Michael Schroeder <mls> > > Date: Thu Apr 7 17:09:14 2016 +0200 > > > > Implement filtering of Requires(pre,post) for installed packages > > > > Should fix issue#126. Except that we need to support it in > > the testcases as well. > > > > > > Looks like this has been fixed. If not - reopen please. > > This patch landed in libsolv 0.6.20, right? > > Previous report was made with libsolv-0.6.22-1.fc25.x86_64. it's different issue - open new bug.
rpm -q libsmbclient --requires | grep samba-common samba-common = 2:4.4.5-1.fc23 dnf remove samba-common no libsmbclient on list to be removed , test successful :-)
(In reply to Sergio Monteiro Basto from comment #17) > rpm -q libsmbclient --requires | grep samba-common > samba-common = 2:4.4.5-1.fc23 > > dnf remove samba-common > > no libsmbclient on list to be removed , test successful :-) this is not something what this bug is about. Please, if you found bug - open new one instead of writing here 5 random bugs/notabugs.
(In reply to Igor Gnatenko from comment #18) > (In reply to Sergio Monteiro Basto from comment #17) > > rpm -q libsmbclient --requires | grep samba-common > > samba-common = 2:4.4.5-1.fc23 > > > > dnf remove samba-common > > > > no libsmbclient on list to be removed , test successful :-) > > this is not something what this bug is about. > > Please, if you found bug - open new one instead of writing here 5 random > bugs/notabugs. The opposite , we find this bug with the example above and now it is fixed , ( test successful ) Thanks,