summaryrefslogtreecommitdiff
path: root/apt-pkg/depcache.cc
diff options
context:
space:
mode:
authorArch Librarian <arch@canonical.com>2004-09-20 16:51:37 +0000
committerArch Librarian <arch@canonical.com>2004-09-20 16:51:37 +0000
commitd38b7b3d803a719b189df80820aeda6a818f4909 (patch)
tree28143d1b948d8b31fc8bec91b50d2fdfe6ff3341 /apt-pkg/depcache.cc
parentc217f42adc1a82c7400e85178f61bf429fea1bc4 (diff)
Needs Unpack fixes
Author: jgg Date: 1998-11-23 07:02:58 GMT Needs Unpack fixes
Diffstat (limited to 'apt-pkg/depcache.cc')
-rw-r--r--apt-pkg/depcache.cc14
1 files changed, 13 insertions, 1 deletions
diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc
index 90c07658b..b3a70d239 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.6 1998/11/23 01:45:58 jgg Exp $
+// $Id: depcache.cc,v 1.7 1998/11/23 07:02:59 jgg Exp $
/* ######################################################################
Dependency Cache - Caches Dependency information.
@@ -213,6 +213,7 @@ void pkgDepCache::AddSizes(const PkgIterator &Pkg,long Mult)
{
iUsrSize += Mult*P.InstVerIter(*this)->InstalledSize;
iDownloadSize += Mult*P.InstVerIter(*this)->Size;
+ return;
}
// Upgrading
@@ -222,11 +223,22 @@ void pkgDepCache::AddSizes(const PkgIterator &Pkg,long Mult)
iUsrSize += Mult*((signed)P.InstVerIter(*this)->InstalledSize -
(signed)Pkg.CurrentVer()->InstalledSize);
iDownloadSize += Mult*P.InstVerIter(*this)->Size;
+ return;
+ }
+
+ // Reinstall
+ if (Pkg.State() == pkgCache::PkgIterator::NeedsUnpack)
+ {
+ iDownloadSize += Mult*P.InstVerIter(*this)->Size;
+ return;
}
// Removing
if (Pkg->CurrentVer != 0 && P.InstallVer == 0)
+ {
iUsrSize -= Mult*Pkg.CurrentVer()->InstalledSize;
+ return;
+ }
}
/*}}}*/
// DepCache::AddStates - Add the package to the state counter /*{{{*/