diff options
author | David Kalnischkies <david@kalnischkies.de> | 2016-06-06 15:04:42 +0200 |
---|---|---|
committer | David Kalnischkies <david@kalnischkies.de> | 2016-06-27 11:57:12 +0200 |
commit | a21aca106ce93e8a2841d4a2c7a8432f9dfc7b6d (patch) | |
tree | 2a535fc3d6c5aabba64709dc3d3be82cf90d66a1 /apt-pkg/packagemanager.cc | |
parent | 14bed2c0108a99d68f453ff61273d5ae59a5c3f0 (diff) |
eipp: implement Immediate-Configuration flag
APT has 3 modes: no immediate configuration, all packages are configured
immediately and its default mode of configuring essentials and
pseudo-essentials immediately only. While this seems like a job of
different planers at first, it might be handy to have it as an option,
too, in case a planer (like apts internal one) supports different modes
where the introduction of individual planers would be counter intuitive.
Diffstat (limited to 'apt-pkg/packagemanager.cc')
-rw-r--r-- | apt-pkg/packagemanager.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/apt-pkg/packagemanager.cc b/apt-pkg/packagemanager.cc index 173fa8085..d5afceb6d 100644 --- a/apt-pkg/packagemanager.cc +++ b/apt-pkg/packagemanager.cc @@ -1040,7 +1040,13 @@ pkgPackageManager::OrderResult pkgPackageManager::OrderInstall() std::string const planer = _config->Find("APT::Planer", "internal"); if (planer != "internal") { - if (EIPP::OrderInstall(planer.c_str(), this, 0, nullptr)) + unsigned int flags = 0; + if (_config->FindB("APT::Immediate-Configure", true) == false) + flags |= EIPP::Request::NO_IMMEDIATE_CONFIGURATION; + else if (_config->FindB("APT::Immediate-Configure-All", false)) + flags |= EIPP::Request::IMMEDIATE_CONFIGURATION_ALL; + + if (EIPP::OrderInstall(planer.c_str(), this, flags, nullptr)) return Completed; else return Failed; |