- pkgProblemResolver Fix(CacheFile);
- if (Fix.Resolve() == false) {
- EDSP::WriteError("An error occured", output);
+ EDSP::WriteProgress(60, "Call problemresolver on current scenario…", output);
+
+ std::string failure;
+ if (upgrade == true) {
+ if (pkgAllUpgrade(CacheFile) == false)
+ failure = "ERR_UNSOLVABLE_UPGRADE";
+ } else if (distUpgrade == true) {
+ if (pkgDistUpgrade(CacheFile) == 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);