Hi, After locally building and installing some packages before submitting them to the buildsys I wanted to reinstall them from the repo once they hit the repo. So I did: [hans@shalem ~]$ sudo dnf reinstall gstreamer1-plugins-ugly gstreamer1-plugins-bad-freeworld gstreamer1-libav audacious-plugins-freeworld* mpg123* libmpg123* Resolving dependencies --> Starting dependency resolution --> Finished dependency resolution Dependencies resolved. Nothing to do. Which is not what I expected, yum did do what I wanted: [hans@shalem ~]$ sudo yum reinstall gstreamer1-plugins-ugly gstreamer1-plugins-bad-freeworld gstreamer1-libav audacious-plugins-freeworld* mpg123* libmpg123* <snip> Reinstalling: audacious-plugins-freeworld x86_64 3.4.3-1.fc21 rpmfusion-free-rawhide 7.5 k audacious-plugins-freeworld-aac x86_64 3.4.3-1.fc21 rpmfusion-free-rawhide 32 k audacious-plugins-freeworld-ffaudio x86_64 3.4.3-1.fc21 rpmfusion-free-rawhide 18 k audacious-plugins-freeworld-mms x86_64 3.4.3-1.fc21 rpmfusion-free-rawhide 14 k audacious-plugins-freeworld-mp3 x86_64 3.4.3-1.fc21 rpmfusion-free-rawhide 16 k gstreamer1-libav x86_64 1.2.3-1.fc21 rpmfusion-free-rawhide 2.8 M gstreamer1-plugins-bad-freeworld x86_64 1.2.3-1.fc21 rpmfusion-free-rawhide 157 k gstreamer1-plugins-ugly x86_64 1.2.3-1.fc21 rpmfusion-free-rawhide 245 k libmpg123 x86_64 1.18.1-1.fc21 rpmfusion-free-rawhide 165 k libmpg123-devel x86_64 1.18.1-1.fc21 rpmfusion-free-rawhide 262 k mpg123 x86_64 1.18.1-1.fc21 rpmfusion-free-rawhide 102 k mpg123-plugins-pulseaudio x86_64 1.18.1-1.fc21 rpmfusion-free-rawhide 11 k Transaction Summary =========================================================== Reinstall 12 Packages Regards, Hans
To add here my observations, [parag@f20 ~]$ sudo dnf reinstall yumex Resolving dependencies --> Starting dependency resolution ---> Package yumex.noarch 3.0.14-1.fc20 will be reinstalled --> Finished dependency resolution Dependencies resolved. ================================================================================ Package Arch Version Repository Size ================================================================================ Reinstalling: yumex noarch 3.0.14-1.fc20 updates 431 k Transaction Summary ================================================================================ Total download size: 431 k Is this ok [y/N]: y Downloading Packages: yumex-3.0.14-1.fc20.noarch.rpm 136 kB/s | 431 kB 00:03 Running transaction check Transaction check succeeded. Running transaction test Transaction test succeeded. Running transaction Reinstalling: yumex-3.0.14-1.fc20.noarch 1/2 Verifying : yumex-3.0.14-1.fc20.noarch 1/2 Verifying : yumex-3.0.14-1.fc20.noarch 2/2 Complete! [parag@f20 ~]$ sudo dnf reinstall iok Resolving dependencies --> Starting dependency resolution ---> Package iok.x86_64 2.1.3-4.fc20 will be reinstalled --> Finished dependency resolution Dependencies resolved. ================================================================================ Package Arch Version Repository Size ================================================================================ Reinstalling: iok x86_64 2.1.3-4.fc20 fedora 114 k Transaction Summary ================================================================================ Total download size: 114 k Is this ok [y/N]: y Downloading Packages: iok-2.1.3-4.fc20.x86_64.rpm 307 kB/s | 114 kB 00:00 Running transaction check Transaction check succeeded. Running transaction test Transaction test succeeded. Running transaction Reinstalling: iok-2.1.3-4.fc20.x86_64 1/2 error: iok-2.1.3-4.fc20.x86_64: erase failed Verifying : iok-2.1.3-4.fc20.x86_64 1/2 Verifying : iok-2.1.3-4.fc20.x86_64 2/2 Complete! [parag@f20 ~]$ I am not sure why iok package failed to erase here?
The erase failure is because of the way dnf tries to do reinstall, which is not supported by rpm: elif tsi.op_type == REINSTALL: ts.addErase(tsi.erased.idx) hdr = tsi.installed.header ts.addInstall(hdr, tsi, 'i') self.logger.debug("populate_rpm_ts: reinstall: %s" % tsi.erased) dnf adds an erasure element, which would technically be the right way to perform a reinstall, but the installing with rpm.RPMPROB_FILTER_REPLACEPKG causes the header scheduled for removal to move, so its erasure fails. And without rpm.RPMPROB_FILTER_REPLACEPKG its not possible to do the install at all. What's needed is a proper reinstall method in rpm (see bug 966715), until then dnf should just drop the addErase() part which is not going to work.
Created attachment 870380 [details] /tmp/dnf-reinstall-0.patch Proof-of-concept patch to use rpm's reinstall method. Note that this will NOT work with existing rpm releases, addReinstall() only exists in rpm git master at the moment. So you'd need to check for the existence of that method in rpm.ts (but the wrapper might get in the way), and fall back to what yum does if its not there (ie just add the install element, no erase element, and enable at least rpm.RPMPROB_FILTER_REPLACEPKG) The problem filter handling in dnf is ... problematic, there should never be any problem filters enabled by default, but that's another story, another related bug as well...
I tried a 'dnf reinstall gjs gjs-debuginfo' this morning, and got "Nothing to do." 'yum reinstall gjs gjs-debuginfo' did the expected (reinstalled it).
*** Bug 1092830 has been marked as a duplicate of this bug. ***
Radek, I'm reassigning this to Ivana who already has some knowledge about the problem. Panu, is that correct that that addReinstall() won't be available in F20? In that case, Ivana, please fix this in the way it works in F20 Yum so we don't have a breakage like this.
I've no plans wrt backporting addReinstall() and everything it needs to rpm 4.11.x - it might happen or then (more likely) not. So for all currently released rpm versions, you need a different fix.
Fixed in the upstream with Panu's help (thanks). Upstream DNF is dependent on rpm >= 4.12.0
dnf-0.6.1-1.fc21 has been submitted as an update for Fedora 21. https://admin.fedoraproject.org/updates/dnf-0.6.1-1.fc21
Package dnf-0.6.1-1.fc21: * should fix your issue, * was pushed to the Fedora 21 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing dnf-0.6.1-1.fc21' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2014-10199/dnf-0.6.1-1.fc21 then log in and leave karma (feedback).
dnf-0.6.1-1.fc21 has been pushed to the Fedora 21 stable repository. If problems still persist, please make note of it in this bug report.