summaryrefslogtreecommitdiff
path: root/apt-pkg/depcache.cc
diff options
context:
space:
mode:
authorArch Librarian <arch@canonical.com>2004-09-20 16:52:04 +0000
committerArch Librarian <arch@canonical.com>2004-09-20 16:52:04 +0000
commit2cca3bd92f9ca2f6e262235e0099383bb47fc6c6 (patch)
tree8d82194555cbdf0a601fd035f399cb770c086949 /apt-pkg/depcache.cc
parent3d22d69ca96db5090ca503226eeb8d7d629c674a (diff)
Size calculation error
Author: jgg Date: 1998-12-07 23:54:42 GMT Size calculation error
Diffstat (limited to 'apt-pkg/depcache.cc')
-rw-r--r--apt-pkg/depcache.cc11
1 files changed, 9 insertions, 2 deletions
diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc
index 4fb26b777..9535a79f1 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.8 1998/12/06 03:41:26 jgg Exp $
+// $Id: depcache.cc,v 1.9 1998/12/07 23:54:42 jgg Exp $
/* ######################################################################
Dependency Cache - Caches Dependency information.
@@ -208,6 +208,12 @@ void pkgDepCache::AddSizes(const PkgIterator &Pkg,long Mult)
{
StateCache &P = PkgState[Pkg->ID];
+ if (Pkg.State() == pkgCache::PkgIterator::NeedsConfigure)
+ {
+ iUsrSize += Mult*P.InstVerIter(*this)->InstalledSize;
+ return;
+ }
+
// Compute the size data
if (P.NewInstall() == true)
{
@@ -227,7 +233,8 @@ void pkgDepCache::AddSizes(const PkgIterator &Pkg,long Mult)
}
// Reinstall
- if (Pkg.State() == pkgCache::PkgIterator::NeedsUnpack)
+ if (Pkg.State() == pkgCache::PkgIterator::NeedsUnpack &&
+ P.Delete() == false)
{
iDownloadSize += Mult*P.InstVerIter(*this)->Size;
return;