]> git.saurik.com Git - apt.git/blobdiff - cmdline/apt-internal-planer.cc
eipp: include global errors in reported error
[apt.git] / cmdline / apt-internal-planer.cc
index 676d84001731370b01a30a713d1cfc42a0c3d76c..c83dba8b18a428c45845d38cc952a303aafb35f4 100644 (file)
@@ -150,6 +150,8 @@ int main(int argc,const char *argv[])                                       /*{{{*/
        unsigned int flags;
        if (EIPP::ReadRequest(input, actions, flags) == false)
                DIE("Parsing the request failed!");
+       _config->Set("APT::Immediate-Configure", (flags & EIPP::Request::NO_IMMEDIATE_CONFIGURATION) == 0);
+       _config->Set("APT::Immediate-Configure-All", (flags & EIPP::Request::IMMEDIATE_CONFIGURATION_ALL) != 0);
 
        EDSP::WriteProgress(5, "Read scenario…", output);
 
@@ -170,15 +172,21 @@ int main(int argc,const char *argv[])                                     /*{{{*/
        if (PM.ApplyRequest(actions) == false)
                DIE("Failed to apply request to packagemanager!");
        pkgPackageManager::OrderResult const Res = PM.DoInstallPreFork();
+       std::ostringstream broken;
        switch (Res)
        {
           case pkgPackageManager::Completed:
              EDSP::WriteProgress(100, "Done", output);
              break;
           case pkgPackageManager::Incomplete:
-             EDSP::WriteError("pm-incomplete", "Planer could only plan Incompletely", output);
+             broken << "Planer could only incompletely plan an installation order!" << std::endl;
+             _error->DumpErrors(broken, GlobalError::DEBUG);
+             EDSP::WriteError("pm-incomplete", broken.str(), output);
+             break;
           case pkgPackageManager::Failed:
-             EDSP::WriteError("pm-failed", "Planer failed to find an order", output);
+             broken << "Planer failed to find an installation order!" << std::endl;
+             _error->DumpErrors(broken, GlobalError::DEBUG);
+             EDSP::WriteError("pm-failed", broken.str(), output);
              break;
        }