From 770aa74afb0fbf1c61605e4e2d0a1c27c3a847d6 Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Thu, 9 May 2019 05:45:26 +0200 Subject: dpkg: Set the force defaults before loading the config file Otherwise we incorrectly override them. Fixes: commit 52427d9075b4b062fa0db16a70d2c2bda6407857 Closes: #928671 --- debian/changelog | 3 +++ src/main.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index dad6e37fd..69ca90e2b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,9 @@ dpkg (1.19.7) UNRELEASED; urgency=medium * dpkg: Fix off-by-one error in dpkg --abort-error. Closes: #924886 Thanks to Tom Goulet . + * dpkg: Set the force defaults before loading the config file, otherwise we + incorrectly override them. Regression introduced in dpkg 1.19.5. + Closes: #928671 -- Guillem Jover Mon, 25 Mar 2019 15:41:00 +0100 diff --git a/src/main.c b/src/main.c index f78cc4099..2bb0a22ae 100644 --- a/src/main.c +++ b/src/main.c @@ -742,8 +742,8 @@ int main(int argc, const char *const *argv) { dpkg_locales_init(PACKAGE); dpkg_program_init("dpkg"); - dpkg_options_load(DPKG, cmdinfos); set_force_default(FORCE_ALL); + dpkg_options_load(DPKG, cmdinfos); dpkg_options_parse(&argv, cmdinfos, printforhelp); /* When running as root, make sure our primary group is also root, so -- cgit v1.2.3