From a8ef7efd6df81d4fb9e52419695f10df9fe76cda Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Thu, 10 Jun 2010 13:09:23 +0200 Subject: * apt-pkg/cacheset.cc: - get the candidate either from an already built depcache or use the policy which is a bit faster than depcache generation --- apt-pkg/cachefile.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'apt-pkg/cachefile.h') diff --git a/apt-pkg/cachefile.h b/apt-pkg/cachefile.h index 1647aff8e..c68f06ed8 100644 --- a/apt-pkg/cachefile.h +++ b/apt-pkg/cachefile.h @@ -20,10 +20,9 @@ #include #include +#include #include -class pkgPolicy; -class pkgSourceList; class pkgCacheFile { protected: @@ -65,6 +64,11 @@ class pkgCacheFile inline pkgPolicy* GetPolicy() { BuildPolicy(); return Policy; }; inline pkgSourceList* GetSourceList() { BuildSourceList(); return SrcList; }; + inline bool IsPkgCacheBuilt() const { return (Cache != NULL); }; + inline bool IsDepCacheBuilt() const { return (DCache != NULL); }; + inline bool IsPolicyBuilt() const { return (Policy != NULL); }; + inline bool IsSrcListBuilt() const { return (SrcList != NULL); }; + pkgCacheFile(); virtual ~pkgCacheFile(); }; -- cgit v1.2.3