Bug 1003598 - RFE: allow to ignore %preun failures
Summary: RFE: allow to ignore %preun failures
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: rawhide
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
Assignee: Packaging Maintenance Team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-09-02 13:05 UTC by Miroslav Suchý
Modified: 2013-09-09 13:34 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-09-09 13:34:28 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Miroslav Suchý 2013-09-02 13:05:43 UTC
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:
https://lists.fedoraproject.org/pipermail/devel/2013-July/186910.html

Comment 1 Ales Kozumplik 2013-09-03 08:26:37 UTC
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.

Comment 2 Miroslav Suchý 2013-09-03 08:46:11 UTC
Or even dnf does not need to solve it directly, but just detect that dupes appeared and point user to:
  /usr/bin/package-cleanup --cleandupes 
I just learned about this command yesterday.

Comment 3 Panu Matilainen 2013-09-03 08:59:17 UTC
%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.

Comment 4 Ales Kozumplik 2013-09-09 13:34:28 UTC
Closing as NOTABUG per comment 3.

I added a FAQ page explaining to the users how to deal with this[1].

[1] http://akozumpl.github.io/dnf/user_faq.html


Note You need to log in before you can comment on or make changes to this bug.