]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
dpkg: disable logging in update-alternatives
authorAndreas Oberritter <obi@opendreambox.org>
Sat, 28 Jan 2017 21:01:56 +0000 (22:01 +0100)
committerAndreas Oberritter <obi@opendreambox.org>
Mon, 8 Apr 2019 11:49:57 +0000 (13:49 +0200)
It caused problems during do_rootfs.

Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
meta/recipes-devtools/dpkg/dpkg/0007-update-alternatives-disable-logging.patch [new file with mode: 0644]
meta/recipes-devtools/dpkg/dpkg_1.18.10.bb

diff --git a/meta/recipes-devtools/dpkg/dpkg/0007-update-alternatives-disable-logging.patch b/meta/recipes-devtools/dpkg/dpkg/0007-update-alternatives-disable-logging.patch
new file mode 100644 (file)
index 0000000..d2b4988
--- /dev/null
@@ -0,0 +1,37 @@
+Upstream-Status: Inappropriate [embedded specific]
+
+From ba9da25e1bc818a3cb3c98624ac9316ed9162aff Mon Sep 17 00:00:00 2001
+From: Andreas Oberritter <obi@opendreambox.org>
+Date: Sat, 28 Jan 2017 21:54:20 +0100
+Subject: [PATCH] update-alternatives: disable logging
+
+By default, update-alternatives writes to /var/log/alternatives.log.
+This causes errors on rootfs creation since recipe-sysroots were enabled.
+
+Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
+---
+ utils/update-alternatives.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/utils/update-alternatives.c b/utils/update-alternatives.c
+index 2b49819..567490c 100644
+--- a/utils/update-alternatives.c
++++ b/utils/update-alternatives.c
+@@ -58,7 +58,7 @@ static const char *prog_path = "update-alternatives";
+ /* Action to perform */
+ static const char *action = NULL;
+-static const char *log_file = LOGDIR "/alternatives.log";
++static const char *log_file;
+ /* Skip alternatives properly configured in auto mode (for --config) */
+ static int opt_skip_auto = 0;
+ static int opt_verbose = 0;
+@@ -424,7 +424,7 @@ log_msg(const char *fmt, ...)
+ {
+       va_list args;
+-      if (fh_log == NULL) {
++      if (fh_log == NULL && log_file != NULL) {
+               fh_log = fopen(log_file, "a");
+               if (fh_log == NULL && errno != EACCES)
+                       syserr(_("cannot append to '%s'"), log_file);
index ee058967b04bc0fa4fc18c2768cc686f4b0a9456..09f6b5a80401703e3c6328303f840f2a18514fae 100644 (file)
@@ -13,6 +13,7 @@ SRC_URI = "http://snapshot.debian.org/archive/debian/20160731T221931Z/pool/main/
            file://0005-dpkg-compiler.m4-remove-Wvla.patch \
            file://0006-add-musleabi-to-known-target-tripets.patch \
            file://0007-dpkg-deb-build.c-Remove-usage-of-clamp-mtime-in-tar.patch \
+           file://0007-update-alternatives-disable-logging.patch \
            "
 SRC_URI_append_class-native = " file://glibc2.5-sync_file_range.patch "