Bug 465409 - RFE: add option to ignore rpm scriptlet errors
Summary: RFE: add option to ignore rpm scriptlet errors
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: rpm
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Panu Matilainen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-10-03 06:37 UTC by Hans de Goede
Modified: 2014-01-21 23:06 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-10-16 17:07:41 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Hans de Goede 2008-10-03 06:37:46 UTC
Description of problem:
Sometime some %postun scritp fails, our packaging policy says scripts should never exit exit a non zero status, but allas even though we have our review process this might still happen now and then.

Since the policy is to add "|| :"  at the end of each scriptlet line, which effectively ignores any errors, we might as well do so at the yum/rpm level.

The problem I want to avoid here is getting double entries in the rpm packagedb because a %postun failed, which then in turn lead to problems with updates later on, see for example this bug against anaconda:
bug 464780

The real problem here is a failing %postun script, but there is nothing which we can do against that retroactively, since the policy is to write scripts so that errors get ignored, it would be good to be able to do this at the yum/rpm level too to avoid bugs like bug 464789 in the future.

Comment 1 Panu Matilainen 2008-10-03 07:06:21 UTC
This needs to be done in rpm, there's nothing yum can do about it.
It's also something I've intended to do for a while now (see somewhat related bug 216221) but just haven't gotten around to it.

There are some extra considerations wrt rpm traditional behavior: error exit from %pre and %preun are used in various (3rd party, often commercial) packages to prevent installation/erasure of a package on non-dependency conditions, that behavior needs to be preserved I'm afraid. For other scriptlets it's more or less ok to ignore the error exit.

Comment 2 Panu Matilainen 2008-10-16 17:07:41 UTC
This is now implemented in rawhide. Not as an option but default behavior.


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