Michael Schröder
5857a2d144
OBS-URL: https://build.opensuse.org/package/show/Base:System/rpm?expand=0&rev=678
36 lines
1.2 KiB
Diff
36 lines
1.2 KiB
Diff
--- lib/rpmscript.c.orig 2024-10-07 09:35:46.000000000 +0000
|
|
+++ lib/rpmscript.c 2024-12-16 09:26:15.035107390 +0000
|
|
@@ -462,7 +462,7 @@ rpmRC rpmScriptRun(rpmScript script, int
|
|
if (script == NULL) return RPMRC_OK;
|
|
|
|
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;
|
|
@@ -724,5 +724,8 @@ rpmscriptTypes rpmScriptType(rpmScript s
|
|
|
|
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;
|
|
}
|
|
--- macros.in.orig 2024-12-16 09:26:03.635130873 +0000
|
|
+++ macros.in 2024-12-16 09:26:15.035107390 +0000
|
|
@@ -1390,6 +1390,11 @@ end
|
|
# Global buildsystem defaults
|
|
%buildsystem_default_prep() %autosetup -C -p1 %*
|
|
|
|
+# Should errors in %post scriptlet be propagated as errors?
|
|
+#
|
|
+# Note: set to 1 for legacy compatibility.
|
|
+%_fail_on_postinstall_errors 0
|
|
+
|
|
# \endverbatim
|
|
#*/
|
|
|