summaryrefslogtreecommitdiff
path: root/apt-private/private-install.cc
diff options
context:
space:
mode:
Diffstat (limited to 'apt-private/private-install.cc')
-rw-r--r--apt-private/private-install.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/apt-private/private-install.cc b/apt-private/private-install.cc
index d1066c869..8d72faecc 100644
--- a/apt-private/private-install.cc
+++ b/apt-private/private-install.cc
@@ -104,12 +104,14 @@ bool InstallPackages(CacheFile &Cache,bool ShwKept,bool Ask, bool Safety)
if (_config->FindB("APT::Get::Simulate") == true)
{
pkgSimulate PM(Cache);
+
int status_fd = _config->FindI("APT::Status-Fd",-1);
APT::Progress::PackageManager *progress = NULL;
if (status_fd > 0)
progress = new APT::Progress::PackageManagerProgressFd(status_fd);
pkgPackageManager::OrderResult Res = PM.DoInstall(progress);
delete progress;
+
if (Res == pkgPackageManager::Failed)
return false;
if (Res != pkgPackageManager::Completed)
@@ -341,6 +343,7 @@ bool InstallPackages(CacheFile &Cache,bool ShwKept,bool Ask, bool Safety)
// FIXME: make this a factory
// select the right progress
int status_fd = _config->FindI("APT::Status-Fd",-1);
+
APT::Progress::PackageManager *progress = NULL;
if (status_fd > 0)
progress = new APT::Progress::PackageManagerProgressFd(status_fd);