2023-10-11 15:13:46 +00:00
|
|
|
--- lib/rpmscript.c.orig 2023-09-19 10:10:10.000000000 +0000
|
|
|
|
+++ lib/rpmscript.c 2023-10-09 13:10:38.011654503 +0000
|
|
|
|
@@ -463,7 +463,7 @@ rpmRC rpmScriptRun(rpmScript script, int
|
2019-10-02 13:28:11 +00:00
|
|
|
if (script == NULL) return RPMRC_OK;
|
2016-04-21 13:24:43 +00:00
|
|
|
|
2019-10-02 13:28:11 +00:00
|
|
|
ARGV_t args = NULL;
|
|
|
|
- rpmlogLvl lvl = (script->flags & RPMSCRIPT_FLAG_CRITICAL) ?
|
|
|
|
+ rpmlogLvl lvl = (rpmScriptFlags(script) & RPMSCRIPT_FLAG_CRITICAL) ?
|
|
|
|
RPMLOG_ERR : RPMLOG_WARNING;
|
|
|
|
rpmRC rc;
|
|
|
|
int script_type = RPMSCRIPTLET_FORK | RPMSCRIPTLET_EXEC;
|
2023-10-11 15:13:46 +00:00
|
|
|
@@ -723,5 +723,8 @@ rpmscriptTypes rpmScriptType(rpmScript s
|
2019-10-02 13:28:11 +00:00
|
|
|
|
|
|
|
rpmscriptFlags rpmScriptFlags(rpmScript script)
|
|
|
|
{
|
|
|
|
- return (script != NULL) ? script->flags : 0;
|
|
|
|
+ rpmscriptFlags flags = (script != NULL) ? script->flags : 0;
|
|
|
|
+ if (script && script->tag == RPMTAG_POSTIN && rpmExpandNumeric("%{_fail_on_postinstall_errors}"))
|
|
|
|
+ flags |= RPMSCRIPT_FLAG_CRITICAL;
|
|
|
|
+ return flags;
|
|
|
|
}
|
2023-10-11 15:13:46 +00:00
|
|
|
--- macros.in.orig 2023-10-09 13:10:35.043659922 +0000
|
|
|
|
+++ macros.in 2023-10-09 13:10:38.015654495 +0000
|
|
|
|
@@ -1377,5 +1377,10 @@ end
|
|
|
|
end
|
|
|
|
}
|
2016-04-21 13:24:43 +00:00
|
|
|
|
2022-06-22 11:52:03 +00:00
|
|
|
+# Should errors in %post scriptlet be propagated as errors?
|
2016-04-21 13:24:43 +00:00
|
|
|
+#
|
|
|
|
+# Note: set to 1 for legacy compatibility.
|
|
|
|
+%_fail_on_postinstall_errors 0
|
|
|
|
+
|
|
|
|
# \endverbatim
|
|
|
|
#*/
|