diff options
-rw-r--r-- | NEWS | 6 | ||||
-rw-r--r-- | src/generic/apt/aptcache.cc | 7 |
2 files changed, 8 insertions, 5 deletions
@@ -48,6 +48,12 @@ earlier releases. * [cmdline]: Exit with non-zero status when a package run is aborted. (Closes: #293008) + * Restore candidate version on undo, keep + + Previously, undo incorrectly restored the candidate + to be currently installed version. Keep did not + restore it at all. (Closes: #529403) + - Cosmetic and UI bugs: * [curses]: Adjust default widths of localized columns: diff --git a/src/generic/apt/aptcache.cc b/src/generic/apt/aptcache.cc index 36d8f63a..0df4ee9f 100644 --- a/src/generic/apt/aptcache.cc +++ b/src/generic/apt/aptcache.cc @@ -1209,6 +1209,7 @@ void aptitudeDepCache::internal_mark_keep(const PkgIterator &Pkg, bool Automatic if(was_garbage_removed) MarkAuto(Pkg, false); + set_candidate_version(GetCandidateVer(Pkg), NULL); pkgDepCache::MarkKeep(Pkg, false, !Automatic); pkgDepCache::SetReInstall(Pkg, false); @@ -1258,11 +1259,7 @@ void aptitudeDepCache::set_candidate_version(const VerIterator &ver, if(set_to_manual) MarkAuto(ver.ParentPkg(), false); - - - // Use the InstVerIter instead of GetCandidateVersion, since - // that seems to store the currently to-be-installed version. - VerIterator prev=(*this)[(ver.ParentPkg())].InstVerIter(GetCache()); + VerIterator prev=(*this)[(ver.ParentPkg())].CandidateVerIter(GetCache()); aptitude_state &estate = get_ext_state(ver.ParentPkg()); |