File enable-postin-scripts-error.diff of Package rpm.7433
--- lib/psm.c
+++ lib/psm.c
@@ -412,7 +412,9 @@ static rpmRC runScript(rpmpsm psm, ARGV_
int warn_only = (stag != RPMTAG_PREIN &&
stag != RPMTAG_PREUN &&
stag != RPMTAG_PRETRANS &&
- stag != RPMTAG_VERIFYSCRIPT);
+ stag != RPMTAG_VERIFYSCRIPT &&
+ !(stag == RPMTAG_POSTIN &&
+ rpmExpandNumeric("%{_fail_on_postinstall_errors}")));
int selinux = !(rpmtsFlags(psm->ts) & RPMTRANS_FLAG_NOCONTEXTS);
sfd = rpmtsNotify(psm->ts, psm->te, RPMCALLBACK_SCRIPT_START, stag, 0);
--- macros.in
+++ macros.in
@@ -1310,6 +1310,11 @@ end}
%{-S:%{expand:%__scm_setup_%{-S*} %{!-v:-q}}}\
%{!-N:%autopatch %{-v} %{-p:-p%{-p*}}}
+# Should errors in %post scriptlet be propagated as errors?
+#
+# Note: set to 1 for legacy compatibility.
+%_fail_on_postinstall_errors 0
+
# \endverbatim
#*/