Bug 465409

Summary: RFE: add option to ignore rpm scriptlet errors
Product: [Fedora] Fedora Reporter: Hans de Goede <hdegoede>
Component: rpmAssignee: Panu Matilainen <pmatilai>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: ffesti, james.antill, jnovy, katzj, pmatilai, pnasrat, tim.lauridsen
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-10-16 17:07:41 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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.