summaryrefslogtreecommitdiff
path: root/apt-pkg/deb
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg/deb')
-rw-r--r--apt-pkg/deb/dpkgpm.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc
index f83b368cd..074e52b3f 100644
--- a/apt-pkg/deb/dpkgpm.cc
+++ b/apt-pkg/deb/dpkgpm.cc
@@ -481,6 +481,9 @@ bool pkgDPkgPM::RunScriptsWithPkgs(const char *Cnf)
strprintf(hookfd, "%d", InfoFD);
setenv("APT_HOOK_INFO_FD", hookfd.c_str(), 1);
+ if (_system != nullptr && _system->IsLocked() == true && stringcasecmp(Cnf, "DPkg::Pre-Install-Pkgs") == 0)
+ setenv("DPKG_FRONTEND_LOCKED", "true", 1);
+
debSystem::DpkgChrootDirectory();
const char *Args[4];
Args[0] = "/bin/sh";