Blame enable-postin-scripts-error.diff
|
|
5b17a5 |
--- lib/rpmscript.c.orig 2023-09-19 10:10:10.000000000 +0000
|
|
|
5b17a5 |
+++ lib/rpmscript.c 2023-10-09 13:10:38.011654503 +0000
|
|
|
5b17a5 |
@@ -463,7 +463,7 @@ rpmRC rpmScriptRun(rpmScript script, int
|
|
Bernhard M. Wiedemann |
eb41fd |
if (script == NULL) return RPMRC_OK;
|
|
Bernhard M. Wiedemann |
1250f9 |
|
|
Bernhard M. Wiedemann |
eb41fd |
ARGV_t args = NULL;
|
|
Bernhard M. Wiedemann |
eb41fd |
- rpmlogLvl lvl = (script->flags & RPMSCRIPT_FLAG_CRITICAL) ?
|
|
Bernhard M. Wiedemann |
eb41fd |
+ rpmlogLvl lvl = (rpmScriptFlags(script) & RPMSCRIPT_FLAG_CRITICAL) ?
|
|
Bernhard M. Wiedemann |
eb41fd |
RPMLOG_ERR : RPMLOG_WARNING;
|
|
Bernhard M. Wiedemann |
eb41fd |
rpmRC rc;
|
|
Bernhard M. Wiedemann |
eb41fd |
int script_type = RPMSCRIPTLET_FORK | RPMSCRIPTLET_EXEC;
|
|
|
5b17a5 |
@@ -723,5 +723,8 @@ rpmscriptTypes rpmScriptType(rpmScript s
|
|
Bernhard M. Wiedemann |
eb41fd |
|
|
Bernhard M. Wiedemann |
eb41fd |
rpmscriptFlags rpmScriptFlags(rpmScript script)
|
|
Bernhard M. Wiedemann |
eb41fd |
{
|
|
Bernhard M. Wiedemann |
eb41fd |
- return (script != NULL) ? script->flags : 0;
|
|
Bernhard M. Wiedemann |
eb41fd |
+ rpmscriptFlags flags = (script != NULL) ? script->flags : 0;
|
|
Bernhard M. Wiedemann |
eb41fd |
+ if (script && script->tag == RPMTAG_POSTIN && rpmExpandNumeric("%{_fail_on_postinstall_errors}"))
|
|
Bernhard M. Wiedemann |
eb41fd |
+ flags |= RPMSCRIPT_FLAG_CRITICAL;
|
|
Bernhard M. Wiedemann |
eb41fd |
+ return flags;
|
|
Bernhard M. Wiedemann |
eb41fd |
}
|
|
|
5b17a5 |
--- macros.in.orig 2023-10-09 13:10:35.043659922 +0000
|
|
|
5b17a5 |
+++ macros.in 2023-10-09 13:10:38.015654495 +0000
|
|
|
5b17a5 |
@@ -1377,5 +1377,10 @@ end
|
|
|
5b17a5 |
end
|
|
|
5b17a5 |
}
|
|
Bernhard M. Wiedemann |
1250f9 |
|
|
|
ffd279 |
+# Should errors in %post scriptlet be propagated as errors?
|
|
Bernhard M. Wiedemann |
1250f9 |
+#
|
|
Bernhard M. Wiedemann |
1250f9 |
+# Note: set to 1 for legacy compatibility.
|
|
Bernhard M. Wiedemann |
1250f9 |
+%_fail_on_postinstall_errors 0
|
|
Bernhard M. Wiedemann |
1250f9 |
+
|
|
Bernhard M. Wiedemann |
1250f9 |
# \endverbatim
|
|
Bernhard M. Wiedemann |
1250f9 |
#*/
|