Bug 465409 - RFE: add option to ignore rpm scriptlet errors
RFE: add option to ignore rpm scriptlet errors
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: rpm (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Panu Matilainen
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-10-03 02:37 EDT by Hans de Goede
Modified: 2014-01-21 18:06 EST (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-10-16 13:07:41 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Hans de Goede 2008-10-03 02:37:46 EDT
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 03:06:21 EDT
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 13:07:41 EDT
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.