diff options
author | David Kalnischkies <david@kalnischkies.de> | 2016-06-06 17:56:08 +0200 |
---|---|---|
committer | David Kalnischkies <david@kalnischkies.de> | 2016-06-27 11:57:12 +0200 |
commit | 91abb30f1c46287d386b646cef8cb42eadcaa250 (patch) | |
tree | 984b13ab846bd27079946e0a906a10e004de3df7 | |
parent | a21aca106ce93e8a2841d4a2c7a8432f9dfc7b6d (diff) |
eipp: include global errors in reported error
Git-Dch: Ignore
-rw-r--r-- | cmdline/apt-internal-planer.cc | 10 | ||||
-rwxr-xr-x | test/integration/test-bug-770291-reinstall | 8 |
2 files changed, 12 insertions, 6 deletions
diff --git a/cmdline/apt-internal-planer.cc b/cmdline/apt-internal-planer.cc index 0657be3b2..c83dba8b1 100644 --- a/cmdline/apt-internal-planer.cc +++ b/cmdline/apt-internal-planer.cc @@ -172,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; } diff --git a/test/integration/test-bug-770291-reinstall b/test/integration/test-bug-770291-reinstall index 0dd8c89a9..389fb1814 100755 --- a/test/integration/test-bug-770291-reinstall +++ b/test/integration/test-bug-770291-reinstall @@ -58,11 +58,11 @@ Conf dependsa (1 unstable [i386])' aptget install --reinstall dependsa dependsb # there is a chance dpkg can actually do these, BUT this depends on the maintainerscripts (not) present # which is very very risky to depend on (and apt doesn't know about that anyhow). testfailure aptget install --reinstall predependsa predependsb -s -o Debug::pkgPackageManager=1 -testequal "E: Couldn't configure predependsa:i386, probably a dependency cycle." tail -n1 rootdir/tmp/testfailure.output +testsuccess grep "^E: Couldn't configure predependsa:i386, probably a dependency cycle.$" rootdir/tmp/testfailure.output # FIXME: the error message is a catch all here, not like the one above testfailure aptget install --reinstall predependsdependsa predependsdependsb -s -o Debug::pkgPackageManager=1 -testequal "E: Could not configure 'predependsdependsb:i386'. " tail -n1 rootdir/tmp/testfailure.output +testsuccess grep "^E: Could not configure 'predependsdependsb:i386'. $" rootdir/tmp/testfailure.output msgmsg 'While we are at it, lets try these loops without reinstall as well' @@ -91,8 +91,8 @@ Conf dependsa (1 unstable [i386])' aptget install dependsa dependsb -s # there is a chance dpkg can actually do these, BUT this depends on the maintainerscripts (not) present # which is very very risky to depend on (and apt doesn't know about that anyhow). testfailure aptget install predependsa predependsb -s -o Debug::pkgPackageManager=1 -testequal "E: Couldn't configure predependsa:i386, probably a dependency cycle." tail -n1 rootdir/tmp/testfailure.output +testsuccess grep "^E: Couldn't configure predependsa:i386, probably a dependency cycle.$" rootdir/tmp/testfailure.output # FIXME: the error message is a catch all here, not like the one above testfailure aptget install predependsdependsa predependsdependsb -s -o Debug::pkgPackageManager=1 -testequal "E: Could not configure 'predependsdependsb:i386'. " tail -n1 rootdir/tmp/testfailure.output +testsuccess grep "^E: Could not configure 'predependsdependsb:i386'. $" rootdir/tmp/testfailure.output |