diff options
author | Julian Andres Klode <julian.klode@canonical.com> | 2018-08-08 15:19:20 +0200 |
---|---|---|
committer | Julian Andres Klode <julian.klode@canonical.com> | 2018-08-08 15:20:44 +0200 |
commit | 55489885b51b02b7f74e601a393ecaefd1f71f9c (patch) | |
tree | c3d977371389bb425069486a6dc9e2a4f0f7fbd4 /apt-pkg/deb | |
parent | e165588b0b9bc7c484c91e324b6b9418b0a29457 (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
Diffstat (limited to 'apt-pkg/deb')
-rw-r--r-- | apt-pkg/deb/debsystem.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/apt-pkg/deb/debsystem.cc b/apt-pkg/deb/debsystem.cc index 11aa2cfd7..0a9e98d6d 100644 --- a/apt-pkg/deb/debsystem.cc +++ b/apt-pkg/deb/debsystem.cc @@ -393,6 +393,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); |