1*4882a593SmuzhiyunFrom 989e425d416474c191b020d0825895e3df4bd033 Mon Sep 17 00:00:00 2001 2*4882a593SmuzhiyunFrom: Alexander Kanavin <alex.kanavin@gmail.com> 3*4882a593SmuzhiyunDate: Thu, 10 Jan 2019 18:14:18 +0100 4*4882a593SmuzhiyunSubject: [PATCH] rpmscript.c: change logging level around scriptlets to INFO 5*4882a593Smuzhiyun from DEBUG 6*4882a593Smuzhiyun 7*4882a593SmuzhiyunThat way we can debug scriptlet failures without writing lots of 8*4882a593Smuzhiyunirrelevant noise to rootfs logs. 9*4882a593Smuzhiyun 10*4882a593SmuzhiyunUpstream-Status: Inappropriate [oe-core specific] 11*4882a593SmuzhiyunSigned-off-by: Alexander Kanavin <alex.kanavin@gmail.com> 12*4882a593Smuzhiyun--- 13*4882a593Smuzhiyun lib/rpmscript.c | 8 ++++---- 14*4882a593Smuzhiyun 1 file changed, 4 insertions(+), 4 deletions(-) 15*4882a593Smuzhiyun 16*4882a593Smuzhiyundiff --git a/lib/rpmscript.c b/lib/rpmscript.c 17*4882a593Smuzhiyunindex 2b0e43862..e319673f1 100644 18*4882a593Smuzhiyun--- a/lib/rpmscript.c 19*4882a593Smuzhiyun+++ b/lib/rpmscript.c 20*4882a593Smuzhiyun@@ -226,7 +226,7 @@ static char * writeScript(const char *cmd, const char *script) 21*4882a593Smuzhiyun if (Ferror(fd)) 22*4882a593Smuzhiyun goto exit; 23*4882a593Smuzhiyun 24*4882a593Smuzhiyun- if (rpmIsDebug() && (rstreq(cmd, "/bin/sh") || rstreq(cmd, "/bin/bash"))) { 25*4882a593Smuzhiyun+ if (rpmIsVerbose() && (rstreq(cmd, "/bin/sh") || rstreq(cmd, "/bin/bash"))) { 26*4882a593Smuzhiyun static const char set_x[] = "set -x\n"; 27*4882a593Smuzhiyun /* Assume failures will be caught by the write below */ 28*4882a593Smuzhiyun Fwrite(set_x, sizeof(set_x[0]), sizeof(set_x)-1, fd); 29*4882a593Smuzhiyun@@ -258,7 +258,7 @@ static rpmRC runExtScript(rpmPlugins plugins, ARGV_const_t prefixes, 30*4882a593Smuzhiyun char *mline = NULL; 31*4882a593Smuzhiyun rpmRC rc = RPMRC_FAIL; 32*4882a593Smuzhiyun 33*4882a593Smuzhiyun- rpmlog(RPMLOG_DEBUG, "%s: scriptlet start\n", sname); 34*4882a593Smuzhiyun+ rpmlog(RPMLOG_INFO, "%s: scriptlet start\n", sname); 35*4882a593Smuzhiyun 36*4882a593Smuzhiyun if (script) { 37*4882a593Smuzhiyun fn = writeScript(*argvp[0], script); 38*4882a593Smuzhiyun@@ -310,7 +310,7 @@ static rpmRC runExtScript(rpmPlugins plugins, ARGV_const_t prefixes, 39*4882a593Smuzhiyun sname, strerror(errno)); 40*4882a593Smuzhiyun goto exit; 41*4882a593Smuzhiyun } else if (pid == 0) {/* Child */ 42*4882a593Smuzhiyun- rpmlog(RPMLOG_DEBUG, "%s: execv(%s) pid %d\n", 43*4882a593Smuzhiyun+ rpmlog(RPMLOG_INFO, "%s: execv(%s) pid %d\n", 44*4882a593Smuzhiyun sname, *argvp[0], (unsigned)getpid()); 45*4882a593Smuzhiyun 46*4882a593Smuzhiyun fclose(in); 47*4882a593Smuzhiyun@@ -353,7 +353,7 @@ static rpmRC runExtScript(rpmPlugins plugins, ARGV_const_t prefixes, 48*4882a593Smuzhiyun reaped = waitpid(pid, &status, 0); 49*4882a593Smuzhiyun } while (reaped == -1 && errno == EINTR); 50*4882a593Smuzhiyun 51*4882a593Smuzhiyun- rpmlog(RPMLOG_DEBUG, "%s: waitpid(%d) rc %d status %x\n", 52*4882a593Smuzhiyun+ rpmlog(RPMLOG_INFO, "%s: waitpid(%d) rc %d status %x\n", 53*4882a593Smuzhiyun sname, (unsigned)pid, (unsigned)reaped, status); 54*4882a593Smuzhiyun 55*4882a593Smuzhiyun if (reaped < 0) { 56