diff options
author | Julian Andres Klode <jak@debian.org> | 2021-01-08 12:04:29 +0000 |
---|---|---|
committer | Julian Andres Klode <jak@debian.org> | 2021-01-08 12:04:29 +0000 |
commit | bab5f78463de487ab5712ce52f1068ea91d3b8f2 (patch) | |
tree | 01d2c08a56864b2d1cd47c1158734d3674eb5346 | |
parent | cf883949f245af02049d1b24ecfd2145e1958078 (diff) | |
parent | c530a192d6a57e091d400cb42f9ce0d5a327ff01 (diff) |
Merge branch 'pu/optional-immediate' into 'master'
Make immediate configuration optional
See merge request apt-team/apt!148
-rw-r--r-- | apt-pkg/packagemanager.cc | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/apt-pkg/packagemanager.cc b/apt-pkg/packagemanager.cc index a1b3f4537..0c6998def 100644 --- a/apt-pkg/packagemanager.cc +++ b/apt-pkg/packagemanager.cc @@ -1006,10 +1006,18 @@ bool pkgPackageManager::SmartUnPack(PkgIterator Pkg, bool const Immediate, int c return false; if (Immediate == true) { - // Perform immediate configuration of the package. - if (SmartConfigure(Pkg, Depth + 1) == false) - _error->Warning(_("Could not perform immediate configuration on '%s'. " - "Please see man 5 apt.conf under APT::Immediate-Configure for details. (%d)"),Pkg.FullName().c_str(),2); + // Perform immediate configuration of the package. + _error->PushToStack(); + bool configured = SmartConfigure(Pkg, Depth + 1); + _error->RevertToStack(); + + if (not configured && Debug) { + clog << OutputInDepth(Depth); + ioprintf(clog, _("Could not perform immediate configuration on '%s'. " + "Please see man 5 apt.conf under APT::Immediate-Configure for details. (%d)"), + Pkg.FullName().c_str(), 2); + clog << endl; + } } return true; |