Red Hat Bugzilla – Bug 1003598
RFE: allow to ignore %preun failures
Last modified: 2013-09-09 09:34:28 EDT
Description of problem:
If package during upgrade fails in %preun script, then I will and with duplicate packages.
Ie. if I have package foo-1.0, which have typo in %preun script and I'm going to upgrade to foo-2.0, then rpm will install foo-2.0 and then it will try to remove foo-1.0 which will fail. So I will happen to have both version installed.
IMO dnf should detect such errors and in such cases run equivalent of:
rpm -e foo-1.0 --noscripts
Or at least ask user if he want to do that.
For historic example see:
Hi Miroslav and thanks for the report. This both makes and doesn't make sense for DNF: on one hand why should DNF be making any effort to be hiding real and possibly serious packaging problems from the user. On the other hand, as you are pointing out, less experienced user might not even know how to manually remove ailing packages. Let's leave this open for now with the outlook of closing as WONTFIX unless both of the following will happen:
:: there's a nice way to make rpm ignore error in the %preun script after it happens and without restarting transaction (Panu?)
:: no new configuration option has to be introduced for this.
Or even dnf does not need to solve it directly, but just detect that dupes appeared and point user to:
I just learned about this command yesterday.
%pre and %preun errors cannot be wiped under the carpet as they are used to intentionally prevent installation and uninstallation by packages "in the wild". It might not be a particularly good practise, but it is the only means of achieving that.
Closing as NOTABUG per comment 3.
I added a FAQ page explaining to the users how to deal with this.