diff options
author | Daniel Nicoletti <dantti12@gmail.com> | 2012-04-15 14:40:30 -0300 |
---|---|---|
committer | Daniel Nicoletti <dantti12@gmail.com> | 2012-04-15 14:40:30 -0300 |
commit | 5932c3134af684025bcba91a05b0012050afee9f (patch) | |
tree | 497cb55f1e4a1c763233d1f906d5982b978802de | |
parent | c0d6d71b5ae1dc1e4771fa6ac88fb6ec2d581903 (diff) |
aptcc: Make sure BuildPolicy is called when getting the dep cache
-rw-r--r-- | backends/aptcc/AptCacheFile.cpp | 7 | ||||
-rw-r--r-- | backends/aptcc/AptCacheFile.h | 5 |
2 files changed, 7 insertions, 5 deletions
diff --git a/backends/aptcc/AptCacheFile.cpp b/backends/aptcc/AptCacheFile.cpp index a199bd0a..2aa66f65 100644 --- a/backends/aptcc/AptCacheFile.cpp +++ b/backends/aptcc/AptCacheFile.cpp @@ -33,15 +33,12 @@ AptCacheFile::~AptCacheFile() bool AptCacheFile::open(bool withLock) { - // TODO maybe subclass this to show more info when opening - OpTextProgress opTextProgress(*_config); - return Open(&opTextProgress, withLock); + return Open(NULL, withLock); } bool AptCacheFile::buildCaches(bool withLock) { - OpTextProgress opTextProgress(*_config); - return BuildCaches(&opTextProgress, withLock); + return BuildCaches(NULL, withLock); } void AptCacheFile::buildPkgRecords() diff --git a/backends/aptcc/AptCacheFile.h b/backends/aptcc/AptCacheFile.h index 71dae3a4..809283b2 100644 --- a/backends/aptcc/AptCacheFile.h +++ b/backends/aptcc/AptCacheFile.h @@ -39,6 +39,11 @@ public: bool buildCaches(bool withLock = false); inline pkgRecords* GetPkgRecords() { buildPkgRecords(); return m_packageRecords; } + /** + * GetDepCache will build the dependency cache if needed and return it + * @note This override if because the policy should be built before the cache + */ + inline pkgDepCache* GetDepCache() { BuildPolicy(); BuildDepCache(); return DCache; } private: void buildPkgRecords(); |