summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Andres Klode <julian.klode@canonical.com>2018-08-08 15:19:20 +0200
committerJulian Andres Klode <julian.klode@canonical.com>2018-09-28 13:25:33 +0200
commit1bdcf519e7d35cbf249b28a4395364cb6c754f02 (patch)
tree4ba8bd286c2c894e5e9a33dce3494e35bc3eda8e
parent8a9a2147bc4346c7e3da8a08719b8f2686d65887 (diff)
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) (cherry picked from commit d66bd6e5e9ae96676e805cce43937a0528cebe1b)
-rw-r--r--apt-pkg/deb/debsystem.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/apt-pkg/deb/debsystem.cc b/apt-pkg/deb/debsystem.cc
index c087d6914..4aceb7e0a 100644
--- a/apt-pkg/deb/debsystem.cc
+++ b/apt-pkg/deb/debsystem.cc
@@ -375,6 +375,11 @@ pid_t debSystem::ExecDpkg(std::vector<std::string> 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);