]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/packagemanager.cc
eipp: enable xz-compressed scenario logging
[apt.git] / apt-pkg / packagemanager.cc
index a61c5f7a9c1f3f7ab90615302fb5213bf5953116..898e5d156714570a5982634948008b04c13f4d18 100644 (file)
@@ -1033,26 +1033,21 @@ pkgPackageManager::OrderResult pkgPackageManager::OrderInstall()
       return Failed;
 
    Reset();
       return Failed;
 
    Reset();
-   
+
    if (Debug == true)
       clog << "Beginning to order" << endl;
 
    std::string const planer = _config->Find("APT::Planer", "internal");
    if (Debug == true)
       clog << "Beginning to order" << endl;
 
    std::string const planer = _config->Find("APT::Planer", "internal");
+   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;
+   else if (_config->FindB("APT::Force-LoopBreak", false))
+      flags |= EIPP::Request::ALLOW_TEMPORARY_REMOVE_OF_ESSENTIALS;
+   auto const ret = EIPP::OrderInstall(planer.c_str(), this, flags, nullptr);
    if (planer != "internal")
    if (planer != "internal")
-   {
-      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;
-      else if (_config->FindB("APT::Force-LoopBreak", false))
-        flags |= EIPP::Request::ALLOW_TEMPORARY_REMOVE_OF_ESSENTIALS;
-
-      if (EIPP::OrderInstall(planer.c_str(), this, flags, nullptr))
-        return Completed;
-      else
-        return Failed;
-   }
+      return ret ? Completed : Failed;
 
    bool const ordering =
        _config->FindB("PackageManager::UnpackAll",true) ?
 
    bool const ordering =
        _config->FindB("PackageManager::UnpackAll",true) ?
@@ -1062,7 +1057,7 @@ pkgPackageManager::OrderResult pkgPackageManager::OrderInstall()
       _error->Error("Internal ordering error");
       return Failed;
    }
       _error->Error("Internal ordering error");
       return Failed;
    }
-   
+
    if (Debug == true)
       clog << "Done ordering" << endl;
 
    if (Debug == true)
       clog << "Done ordering" << endl;