summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2019-01-11 11:43:49 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-01-14 11:35:55 +0000
commite858593584deccc074bfa30acd85dd48cb58beb0 (patch)
tree619b69b45cd25923a2153abec5249b38b06cf18c /meta
parent4ebe398b1da64f9e6a02a1e617e38cd8bd6b0eda (diff)
downloadpoky-e858593584deccc074bfa30acd85dd48cb58beb0.tar.gz
rpm: produce sane amount of logging when creating a rootfs
Previously there was lots of irrelevant noise in the logs, because we also wanted to be able to debug postinst issues easily. I have adjusted the logging levels so that postinst info is still written to the logs, but other things are not. [YOCTO #13119] (From OE-Core rev: ffb7b8f70937a7d95814c1a99527d5ea7cbf7cee) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/lib/oe/package_manager.py2
-rw-r--r--meta/recipes-devtools/rpm/files/0016-rpmscript.c-change-logging-level-around-scriptlets-t.patch55
-rw-r--r--meta/recipes-devtools/rpm/rpm_4.14.2.1.bb1
3 files changed, 57 insertions, 1 deletions
diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index 392fe7e372..7ff76c61cd 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -966,7 +966,7 @@ class RpmPM(PackageManager):
966 os.environ['RPM_ETCCONFIGDIR'] = self.target_rootfs 966 os.environ['RPM_ETCCONFIGDIR'] = self.target_rootfs
967 967
968 dnf_cmd = bb.utils.which(os.getenv('PATH'), "dnf") 968 dnf_cmd = bb.utils.which(os.getenv('PATH'), "dnf")
969 standard_dnf_args = ["-v", "--rpmverbosity=debug", "-y", 969 standard_dnf_args = ["-v", "--rpmverbosity=info", "-y",
970 "-c", oe.path.join(self.target_rootfs, "etc/dnf/dnf.conf"), 970 "-c", oe.path.join(self.target_rootfs, "etc/dnf/dnf.conf"),
971 "--setopt=reposdir=%s" %(oe.path.join(self.target_rootfs, "etc/yum.repos.d")), 971 "--setopt=reposdir=%s" %(oe.path.join(self.target_rootfs, "etc/yum.repos.d")),
972 "--installroot=%s" % (self.target_rootfs), 972 "--installroot=%s" % (self.target_rootfs),
diff --git a/meta/recipes-devtools/rpm/files/0016-rpmscript.c-change-logging-level-around-scriptlets-t.patch b/meta/recipes-devtools/rpm/files/0016-rpmscript.c-change-logging-level-around-scriptlets-t.patch
new file mode 100644
index 0000000000..43e9859ef3
--- /dev/null
+++ b/meta/recipes-devtools/rpm/files/0016-rpmscript.c-change-logging-level-around-scriptlets-t.patch
@@ -0,0 +1,55 @@
1From 989e425d416474c191b020d0825895e3df4bd033 Mon Sep 17 00:00:00 2001
2From: 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>
12---
13 lib/rpmscript.c | 8 ++++----
14 1 file changed, 4 insertions(+), 4 deletions(-)
15
16diff --git a/lib/rpmscript.c b/lib/rpmscript.c
17index 2b0e43862..e319673f1 100644
18--- a/lib/rpmscript.c
19+++ b/lib/rpmscript.c
20@@ -226,7 +226,7 @@ static char * writeScript(const char *cmd, const char *script)
21 if (Ferror(fd))
22 goto exit;
23
24- if (rpmIsDebug() && (rstreq(cmd, "/bin/sh") || rstreq(cmd, "/bin/bash"))) {
25+ if (rpmIsVerbose() && (rstreq(cmd, "/bin/sh") || rstreq(cmd, "/bin/bash"))) {
26 static const char set_x[] = "set -x\n";
27 /* Assume failures will be caught by the write below */
28 Fwrite(set_x, sizeof(set_x[0]), sizeof(set_x)-1, fd);
29@@ -258,7 +258,7 @@ static rpmRC runExtScript(rpmPlugins plugins, ARGV_const_t prefixes,
30 char *mline = NULL;
31 rpmRC rc = RPMRC_FAIL;
32
33- rpmlog(RPMLOG_DEBUG, "%s: scriptlet start\n", sname);
34+ rpmlog(RPMLOG_INFO, "%s: scriptlet start\n", sname);
35
36 if (script) {
37 fn = writeScript(*argvp[0], script);
38@@ -310,7 +310,7 @@ static rpmRC runExtScript(rpmPlugins plugins, ARGV_const_t prefixes,
39 sname, strerror(errno));
40 goto exit;
41 } else if (pid == 0) {/* Child */
42- rpmlog(RPMLOG_DEBUG, "%s: execv(%s) pid %d\n",
43+ rpmlog(RPMLOG_INFO, "%s: execv(%s) pid %d\n",
44 sname, *argvp[0], (unsigned)getpid());
45
46 fclose(in);
47@@ -353,7 +353,7 @@ static rpmRC runExtScript(rpmPlugins plugins, ARGV_const_t prefixes,
48 reaped = waitpid(pid, &status, 0);
49 } while (reaped == -1 && errno == EINTR);
50
51- rpmlog(RPMLOG_DEBUG, "%s: waitpid(%d) rc %d status %x\n",
52+ rpmlog(RPMLOG_INFO, "%s: waitpid(%d) rc %d status %x\n",
53 sname, (unsigned)pid, (unsigned)reaped, status);
54
55 if (reaped < 0) {
diff --git a/meta/recipes-devtools/rpm/rpm_4.14.2.1.bb b/meta/recipes-devtools/rpm/rpm_4.14.2.1.bb
index ef5d631917..66eef557df 100644
--- a/meta/recipes-devtools/rpm/rpm_4.14.2.1.bb
+++ b/meta/recipes-devtools/rpm/rpm_4.14.2.1.bb
@@ -40,6 +40,7 @@ SRC_URI = "git://github.com/rpm-software-management/rpm;branch=rpm-4.14.x \
40 file://0004-build-pack.c-remove-static-local-variables-from-buil.patch \ 40 file://0004-build-pack.c-remove-static-local-variables-from-buil.patch \
41 file://0001-perl-disable-auto-reqs.patch \ 41 file://0001-perl-disable-auto-reqs.patch \
42 file://0001-rpm-rpmio.c-restrict-virtual-memory-usage-if-limit-s.patch \ 42 file://0001-rpm-rpmio.c-restrict-virtual-memory-usage-if-limit-s.patch \
43 file://0016-rpmscript.c-change-logging-level-around-scriptlets-t.patch \
43 " 44 "
44 45
45PE = "1" 46PE = "1"