From d66bd6e5e9ae96676e805cce43937a0528cebe1b Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Wed, 8 Aug 2018 15:19:20 +0200 Subject: Set DPKG_FRONTEND_LOCKED as needed when doing selection changes We forgot to set the variable for the selection changes. Let's set it for that and some other dpkg calls. Regression-Of: c2c8b4787b0882234ba2772ec7513afbf97b563a (cherry picked from commit 55489885b51b02b7f74e601a393ecaefd1f71f9c) --- apt-pkg/deb/debsystem.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/apt-pkg/deb/debsystem.cc b/apt-pkg/deb/debsystem.cc index ee42cc6a7..0b8bb6cb4 100644 --- a/apt-pkg/deb/debsystem.cc +++ b/apt-pkg/deb/debsystem.cc @@ -394,6 +394,11 @@ pid_t debSystem::ExecDpkg(std::vector const &sArgs, int * const inp if (DiscardOutput == true) dup2(nullfd, STDERR_FILENO); debSystem::DpkgChrootDirectory(); + + if (_system != nullptr && _system->IsLocked() == true) + { + setenv("DPKG_FRONTEND_LOCKED", "true", 1); + } execvp(Args[0], (char**) &Args[0]); _error->WarningE("dpkg", "Can't execute dpkg!"); _exit(100); -- cgit v1.2.3