summaryrefslogtreecommitdiff
path: root/apt-pkg/depcache.h
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2010-06-09 10:50:32 +0200
committerDavid Kalnischkies <kalnischkies@gmail.com>2010-06-09 10:50:32 +0200
commit1aa9b2974d33015102224ffb738b2e8e0a4bcb42 (patch)
treeb8c164c9634d2c6cf6bc245cd6fce50f680dea78 /apt-pkg/depcache.h
parent3c9772456931842dee211444086c15dd2e5f9a29 (diff)
parent3a882565a943644dcf7287c9673fb07f617fb851 (diff)
* apt-pkg/pkgcache.h:
- switch {,Install-}Size to unsigned long long - deal with long long, not with int to remove 2GB Limit (LP: #250909) - deprecate AddSize with Multiplier as it is unused and switch to boolean instead to handle the sizes more gracefully. - switch i{Download,Usr}Size from double to (un)signed long long * cmdline/apt-get.cc: - use unsigned long long instead of double to store values it gets
Diffstat (limited to 'apt-pkg/depcache.h')
-rw-r--r--apt-pkg/depcache.h17
1 files changed, 10 insertions, 7 deletions
diff --git a/apt-pkg/depcache.h b/apt-pkg/depcache.h
index 3decc7a5f..c6f245a80 100644
--- a/apt-pkg/depcache.h
+++ b/apt-pkg/depcache.h
@@ -286,9 +286,11 @@ class pkgDepCache : protected pkgCache::Namespace
pkgCache *Cache;
StateCache *PkgState;
unsigned char *DepState;
-
- double iUsrSize;
- double iDownloadSize;
+
+ /** Stores the space changes after installation */
+ signed long long iUsrSize;
+ /** Stores how much we need to download to get the packages */
+ unsigned long long iDownloadSize;
unsigned long iInstCount;
unsigned long iDelCount;
unsigned long iKeepCount;
@@ -321,8 +323,9 @@ class pkgDepCache : protected pkgCache::Namespace
void Update(PkgIterator const &P);
// Count manipulators
- void AddSizes(const PkgIterator &Pkg,signed long Mult = 1);
- inline void RemoveSizes(const PkgIterator &Pkg) {AddSizes(Pkg,-1);};
+ void AddSizes(const PkgIterator &Pkg, bool const &Invert = false);
+ inline void RemoveSizes(const PkgIterator &Pkg) {AddSizes(Pkg, true);};
+ void AddSizes(const PkgIterator &Pkg,signed long Mult) __deprecated;
void AddStates(const PkgIterator &Pkg,int Add = 1);
inline void RemoveStates(const PkgIterator &Pkg) {AddStates(Pkg,-1);};
@@ -451,8 +454,8 @@ class pkgDepCache : protected pkgCache::Namespace
bool writeStateFile(OpProgress *prog, bool InstalledOnly=true);
// Size queries
- inline double UsrSize() {return iUsrSize;};
- inline double DebSize() {return iDownloadSize;};
+ inline signed long long UsrSize() {return iUsrSize;};
+ inline unsigned long long DebSize() {return iDownloadSize;};
inline unsigned long DelCount() {return iDelCount;};
inline unsigned long KeepCount() {return iKeepCount;};
inline unsigned long InstCount() {return iInstCount;};