Description of problem: Sometimes packages seem to record non-installed files, or files get removed otherwise. The result is packages that can't be uninstalled regularly. Has happened a few times when trying to update using dnf, the update fails (!), often leaving the obsolete, impossible to uninstall, package and the last version around. I.e., here: # rpm -e calibre-3.36.0-8.fc30 rm: cannot remove '/usr/share/calibre/viewer/mathjax': No such file or directory error: %preun(calibre-3.36.0-8.fc30.x86_64) scriptlet failed, exit status 1 error: calibre-3.36.0-8.fc30.x86_64: erase failed Version-Release number of selected component (if applicable): rpm-4.15.1-1.fc31.x86_64 How reproducible: Happens for a few packages each upgrade cycle... Steps to Reproduce: 1. Install some package, delete a file from it 2. rpm -e <above package> Actual results: Complaint abount removing a non-existent file/directory, package isn't erased Expected results: Complaint is OK (may need investigation), but package should be erased. Specially if it was somehow mangled... Additional info: Possible workaround: Reinstall the broken package, then erase. Or create (touch(1) or mkdir(1) as needed) what is "missing", then erase.
This is a bug in the calibre package %preun scriptlet, not rpm.
The scriptlet uses 'rm -f' in other branches, so it is fixed there. I pushed a commit to do the same in F30. Unfortunately, it's something that we can't fix retroactively, but since this is a special case, I think it's OK to just fix it for subsequent versions. I won't rebuild now.
The same has happened to me with several packages. Perhaps an audit all-around is warranted? Some handholding for scriptlets?
It's the (completely unreasonable imo) refusal of rpm maintainers to fix the glaring deficiency in rpm and to require maintainers to write complex scriptlets to make package upgrades work.
FEDORA-2020-65a5d0462d has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2020-65a5d0462d
calibre-4.12.0-1.fc32 has been pushed to the Fedora 32 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-df465db1c1
calibre-4.12.0-1.fc31 has been pushed to the Fedora 31 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-65a5d0462d
calibre-4.12.0-1.fc31 has been pushed to the Fedora 31 stable repository. If problems still persist, please make note of it in this bug report.
calibre-4.12.0-1.fc32 has been pushed to the Fedora 32 stable repository. If problems still persist, please make note of it in this bug report.