Red Hat Bugzilla – Bug 1284981
RFE: implement `restore` dnf plugin to remove duplicated packages on the system
Last modified: 2016-11-25 07:20:18 EST
Description of problem:
During the gold age of 'yum', 'yum reinstall <packagename>' would reinstall the package and cleanup the existing duplicate (for example left by a broken transaction.)
'dnf' is unable to do it and there seems to be no other way to do it.
'yum-deprecated check' says:
zlib-1.2.8-9.fc23.i686 is a duplicate with zlib-1.2.8-7.fc22.i686
then we try to fix this manually:
# dnf reinstall zlib
Last metadata expiration check performed 1:27:28 ago on Tue Nov 24 15:46:41 2015.
Package Arch Version Repository Size
zlib i686 1.2.8-9.fc23 fedora 98 k
replacing zlib.i686 1.2.8-7.fc22
minizip i686 1.2.8-7.fc22 @System 54 k
Remove 1 Package
Total size: 98 k
Is this ok [y/N]: y
[SKIPPED] zlib-1.2.8-9.fc23.i686.rpm: Already downloaded
Running transaction check
Transaction check succeeded.
Running transaction test
The downloaded packages were saved in cache till the next successful transaction.
You can remove cached packages by executing 'dnf clean packages'.
Error: Transaction check error:
file /usr/lib/libz.so.1.2.8 from install of zlib-1.2.8-9.fc23.i686 conflicts with file from package zlib-1.2.8-7.fc22.i686
<actually, no error summary can be seen here>
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1.for any package that has a duplicate, try to reinstall it in order to remove the duplicate
package is not reinstalled, duplicate is not removed
package is reinstalled, duplicate is removed
Of course, ideally we should have a way to do this automatically for ALL duplicated packages.
By the way, it would be nice if this is the default behaviour of upgrade, also.
reinstall works as expected. The problems of previous transactions should be fixed by plugin or manually. DNF cannot know what is expected operation from user's POV.
Not sure 'restore' is the right word. I'd rather call it 'cleanup_duplicates'. On the other hand, dnf-plugins-extras is not yet available, right?
*** Bug 1291432 has been marked as a duplicate of this bug. ***
'cleanup_duplicates' sounds good. It will be a separate subpackage in dnf-plugins-extras (this already exists).
This package has changed ownership in the Fedora Package Database. Reassigning to the new owner of this component.
*** Bug 1366492 has been marked as a duplicate of this bug. ***
*** Bug 1366122 has been marked as a duplicate of this bug. ***
*** Bug 1277697 has been marked as a duplicate of this bug. ***
This message is a reminder that Fedora 23 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 23. 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'
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 23 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.
(In reply to Honza Silhan from comment #5)
> 'cleanup_duplicates' sounds good. It will be a separate subpackage in
> dnf-plugins-extras (this already exists).
Is this a good idea? When I need this functionality, I'm usually not able to install additional packages.
To list duplicated packages use
dnf repoquery --duplicated
To remove them
dnf remove --duplicates