blob: b3d57cc8703e174c4ee8138dae738869100c7c27 [file] [log] [blame]
Patrick Williams73bd93f2024-02-20 08:07:48 -06001From 0005ab544230020e854e9709b2bc0501702c2968 Mon Sep 17 00:00:00 2001
Brad Bishop19323692019-04-05 15:28:33 -04002From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Thu, 10 Jan 2019 18:14:18 +0100
4Subject: [PATCH] rpmscript.c: change logging level around scriptlets to INFO
5 from DEBUG
6
7That way we can debug scriptlet failures without writing lots of
8irrelevant noise to rootfs logs.
9
10Upstream-Status: Inappropriate [oe-core specific]
11Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Patrick Williams73bd93f2024-02-20 08:07:48 -060012
Brad Bishop19323692019-04-05 15:28:33 -040013---
14 lib/rpmscript.c | 8 ++++----
15 1 file changed, 4 insertions(+), 4 deletions(-)
16
Patrick Williams73bd93f2024-02-20 08:07:48 -060017diff --git a/lib/rpmscript.c b/lib/rpmscript.c
18index 37ada014c..bab0c97a6 100644
19--- a/lib/rpmscript.c
20+++ b/lib/rpmscript.c
21@@ -291,7 +291,7 @@ static char * writeScript(const char *cmd, const char *script)
Brad Bishop19323692019-04-05 15:28:33 -040022 if (Ferror(fd))
23 goto exit;
24
25- if (rpmIsDebug() && (rstreq(cmd, "/bin/sh") || rstreq(cmd, "/bin/bash"))) {
26+ if (rpmIsVerbose() && (rstreq(cmd, "/bin/sh") || rstreq(cmd, "/bin/bash"))) {
27 static const char set_x[] = "set -x\n";
28 /* Assume failures will be caught by the write below */
29 Fwrite(set_x, sizeof(set_x[0]), sizeof(set_x)-1, fd);
Patrick Williams73bd93f2024-02-20 08:07:48 -060030@@ -323,7 +323,7 @@ static rpmRC runExtScript(rpmPlugins plugins, ARGV_const_t prefixes,
Brad Bishop19323692019-04-05 15:28:33 -040031 char *mline = NULL;
32 rpmRC rc = RPMRC_FAIL;
33
34- rpmlog(RPMLOG_DEBUG, "%s: scriptlet start\n", sname);
35+ rpmlog(RPMLOG_INFO, "%s: scriptlet start\n", sname);
36
37 if (script) {
38 fn = writeScript(*argvp[0], script);
Patrick Williams73bd93f2024-02-20 08:07:48 -060039@@ -375,7 +375,7 @@ static rpmRC runExtScript(rpmPlugins plugins, ARGV_const_t prefixes,
Brad Bishop19323692019-04-05 15:28:33 -040040 sname, strerror(errno));
41 goto exit;
42 } else if (pid == 0) {/* Child */
43- rpmlog(RPMLOG_DEBUG, "%s: execv(%s) pid %d\n",
44+ rpmlog(RPMLOG_INFO, "%s: execv(%s) pid %d\n",
45 sname, *argvp[0], (unsigned)getpid());
46
47 fclose(in);
Patrick Williams73bd93f2024-02-20 08:07:48 -060048@@ -418,7 +418,7 @@ static rpmRC runExtScript(rpmPlugins plugins, ARGV_const_t prefixes,
Brad Bishop19323692019-04-05 15:28:33 -040049 reaped = waitpid(pid, &status, 0);
50 } while (reaped == -1 && errno == EINTR);
51
52- rpmlog(RPMLOG_DEBUG, "%s: waitpid(%d) rc %d status %x\n",
53+ rpmlog(RPMLOG_INFO, "%s: waitpid(%d) rc %d status %x\n",
54 sname, (unsigned)pid, (unsigned)reaped, status);
55
56 if (reaped < 0) {