Index: common/rpackage.cc =================================================================== --- common/rpackage.cc (revision 868) +++ common/rpackage.cc (working copy) @@ -842,17 +842,18 @@ } -void RPackage::setInstall() +bool RPackage::setInstall() { _depcache->MarkInstall(*_package, true); pkgDepCache::StateCache &State = (*_depcache)[*_package]; // if there is something wrong, try to fix it if(!State.Install() || _depcache->BrokenCount() > 0) { - pkgProblemResolver Fix(_depcache); - Fix.Clear(*_package); - Fix.Protect(*_package); - Fix.Resolve(true); + if (pkgFixBroken(*_depcache) == false + || _depcache->BrokenCount() != 0) + return _error->Error(_("Unable to correct dependencies")); + if (pkgMinimizeUpgrade(*_depcache) == false) + return _error->Error(_("Unable to minimize the upgrade set")); } #ifdef WITH_LUA @@ -864,6 +865,8 @@ if (_notify) _lister->notifyChange(this); + + return true; } Index: common/rpackage.h =================================================================== --- common/rpackage.h (revision 868) +++ common/rpackage.h (working copy) @@ -198,7 +198,7 @@ // change status void setKeep(); - void setInstall(); + bool setInstall(); void setRemove(bool purge = false); //XXX: purge for debian void setNotify(bool flag=true);