summaryrefslogtreecommitdiff
path: root/apt-pkg/depcache.cc
diff options
context:
space:
mode:
authorArch Librarian <arch@canonical.com>2004-09-20 16:56:03 +0000
committerArch Librarian <arch@canonical.com>2004-09-20 16:56:03 +0000
commit6321777b7bad1303a32b2d5691327adb74074e0a (patch)
tree0ac2e154678f150504bdcac4ee657ac3e8c0d0df /apt-pkg/depcache.cc
parent2800688553a05fdac9fa732fc0af0d5318aee122 (diff)
El Te Dee Patch
Author: jgg Date: 2000-05-31 02:49:37 GMT El Te Dee Patch
Diffstat (limited to 'apt-pkg/depcache.cc')
-rw-r--r--apt-pkg/depcache.cc22
1 files changed, 20 insertions, 2 deletions
diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc
index 707cb93cd..1469126d2 100644
--- a/apt-pkg/depcache.cc
+++ b/apt-pkg/depcache.cc
@@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: depcache.cc,v 1.21 1999/10/22 05:58:54 jgg Exp $
+// $Id: depcache.cc,v 1.22 2000/05/31 02:49:37 jgg Exp $
/* ######################################################################
Dependency Cache - Caches Dependency information.
@@ -275,7 +275,7 @@ void pkgDepCache::AddStates(const PkgIterator &Pkg,int Add)
}
// Installed, no upgrade
- if (State.Upgradable() == false)
+ if (State.Status == 0)
{
if (State.Mode == ModeDelete)
iDelCount += Add;
@@ -770,3 +770,21 @@ const char *pkgDepCache::StateCache::StripEpoch(const char *Ver)
return Ver;
}
/*}}}*/
+// StateCache::SetCandidateVersion - Change the candidate version /*{{{*/
+// ---------------------------------------------------------------------
+/* */
+void pkgDepCache::SetCandidateVersion(VerIterator TargetVer)
+{
+ pkgCache::PkgIterator I = TargetVer.ParentPkg();
+
+ RemoveSizes(I);
+ RemoveStates(I);
+
+ PkgState[I->ID].CandidateVer = (Version *) TargetVer;
+ PkgState[I->ID].Update(I, *this);
+
+ AddStates(I);
+ Update(I);
+ AddSizes(I);
+}
+ /*}}}*/