summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2010-12-05 12:59:07 +0100
committerDavid Kalnischkies <kalnischkies@gmail.com>2010-12-05 12:59:07 +0100
commit758729c8084a19859d3c9ccf948bb2ec507b0d0c (patch)
tree16034fa0e9e2c5214b6668e7ccc381c3d2c3952f /apt-pkg
parentb99d5aeff24b0b8477e5699ce391bfd63478d742 (diff)
check in the DepCache::SetCandidateVersion that the package is marked to
be installed before setting the InstallVer as otherwise the Sizes states will be confused in some cases - this can happen now as SetCandidateRelease works also on packages which are not installed now (or will never in the final solution)
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/depcache.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc
index 4a8e53eb3..594c085a5 100644
--- a/apt-pkg/depcache.cc
+++ b/apt-pkg/depcache.cc
@@ -1523,7 +1523,7 @@ void pkgDepCache::SetCandidateVersion(VerIterator TargetVer, bool const &Pseudo)
RemoveSizes(Pkg);
RemoveStates(Pkg);
- if (P.CandidateVer == P.InstallVer)
+ if (P.CandidateVer == P.InstallVer && P.Install() == true)
P.InstallVer = (Version *)TargetVer;
P.CandidateVer = (Version *)TargetVer;
P.Update(Pkg,*this);
@@ -1570,6 +1570,7 @@ bool pkgDepCache::SetCandidateRelease(pkgCache::VerIterator TargetVer,
std::string const &TargetRel,
std::list<std::pair<pkgCache::VerIterator, pkgCache::VerIterator> > &Changed)
{
+ ActionGroup group(*this);
SetCandidateVersion(TargetVer);
if (TargetRel == "installed" || TargetRel == "candidate") // both doesn't make sense in this context