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 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);