From 97be52d4372d1ca6b8d276060b434348876ca322 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Mon, 23 May 2011 18:10:48 +0200 Subject: log reinstall commands in history.log --- apt-pkg/depcache.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'apt-pkg/depcache.h') diff --git a/apt-pkg/depcache.h b/apt-pkg/depcache.h index 750da3d6f..9efe110f5 100644 --- a/apt-pkg/depcache.h +++ b/apt-pkg/depcache.h @@ -231,6 +231,7 @@ class pkgDepCache : protected pkgCache::Namespace // Various test members for the current status of the package inline bool NewInstall() const {return Status == 2 && Mode == ModeInstall;}; inline bool Delete() const {return Mode == ModeDelete;}; + inline bool Purge() const {return Delete() == true && (iFlags & pkgDepCache::Purge) == pkgDepCache::Purge; }; inline bool Keep() const {return Mode == ModeKeep;}; inline bool Upgrade() const {return Status > 0 && Mode == ModeInstall;}; inline bool Upgradable() const {return Status >= 1;}; @@ -241,6 +242,7 @@ class pkgDepCache : protected pkgCache::Namespace inline bool InstBroken() const {return (DepState & DepInstMin) != DepInstMin;}; inline bool InstPolicyBroken() const {return (DepState & DepInstPolicy) != DepInstPolicy;}; inline bool Install() const {return Mode == ModeInstall;}; + inline bool ReInstall() const {return Delete() == false && (iFlags & pkgDepCache::ReInstall) == pkgDepCache::ReInstall;}; inline VerIterator InstVerIter(pkgCache &Cache) {return VerIterator(Cache,InstallVer);}; inline VerIterator CandidateVerIter(pkgCache &Cache) -- cgit v1.2.3