From c66e50f7abefbd104378c515ef642dce67df4c86 Mon Sep 17 00:00:00 2001 From: Andreas Oberritter Date: Sat, 28 Jan 2017 22:01:56 +0100 Subject: [PATCH] dpkg: disable logging in update-alternatives It caused problems during do_rootfs. Signed-off-by: Andreas Oberritter --- ...-update-alternatives-disable-logging.patch | 37 +++++++++++++++++++ meta/recipes-devtools/dpkg/dpkg_1.19.7.bb | 1 + 2 files changed, 38 insertions(+) create mode 100644 meta/recipes-devtools/dpkg/dpkg/0007-update-alternatives-disable-logging.patch 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 index 00000000000..bb242c0edaf --- /dev/null +++ b/meta/recipes-devtools/dpkg/dpkg/0007-update-alternatives-disable-logging.patch @@ -0,0 +1,37 @@ +Upstream-Status: Inappropriate [embedded specific] + +From 66cce62487464e7fbfdb5350505d0b2c88f9be2c Mon Sep 17 00:00:00 2001 +From: Andreas Oberritter +Date: Thu, 9 May 2019 13:11:04 +0200 +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 +--- + 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 4794cd807..fdf178296 100644 +--- a/utils/update-alternatives.c ++++ b/utils/update-alternatives.c +@@ -100,7 +100,7 @@ enum output_mode { + + /* Action to perform */ + static enum action action = ACTION_NONE; +-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 = OUTPUT_NORMAL; +@@ -490,7 +490,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); diff --git a/meta/recipes-devtools/dpkg/dpkg_1.19.7.bb b/meta/recipes-devtools/dpkg/dpkg_1.19.7.bb index 9d047679299..72930c0cf9b 100644 --- a/meta/recipes-devtools/dpkg/dpkg_1.19.7.bb +++ b/meta/recipes-devtools/dpkg/dpkg_1.19.7.bb @@ -12,6 +12,7 @@ SRC_URI = "${DEBIAN_MIRROR}/main/d/${BPN}/${BPN}_${PV}.tar.xz \ file://0006-add-musleabi-to-known-target-tripets.patch \ file://0007-dpkg-deb-build.c-Remove-usage-of-clamp-mtime-in-tar.patch \ file://0001-dpkg-Support-muslx32-build.patch \ + file://0007-update-alternatives-disable-logging.patch \ file://pager.patch \ " SRC_URI_append_class-native = " \ -- 2.47.2