summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 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<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);