Red Hat Bugzilla – Bug 465409
RFE: add option to ignore rpm scriptlet errors
Last modified: 2014-01-21 18:06:12 EST
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:
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.
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.
This is now implemented in rawhide. Not as an option but default behavior.