- if (pkgDistUpgrade(CacheFile) == false) {
- EDSP::WriteError("ERR_UNSOLVABLE_DIST_UPGRADE", "An dist-upgrade error occured", output);
- return 0;
- }
- } else if (Fix.Resolve() == false) {
- EDSP::WriteError("ERR_UNSOLVABLE", "An error occured", output);
+ if (APT::Upgrade::Upgrade(CacheFile, APT::Upgrade::ALLOW_EVERYTHING) == false)
+ failure = "ERR_UNSOLVABLE_DIST_UPGRADE";
+ } else if (Fix.Resolve() == false)
+ failure = "ERR_UNSOLVABLE";
+
+ if (failure.empty() == false) {
+ std::ostringstream broken;
+ ShowBroken(broken, CacheFile, false);
+ EDSP::WriteError(failure.c_str(), broken.str(), output);