From 32cc424bf5e99c101cfa350e18127cbcafddd8a9 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Wed, 12 Aug 2015 13:10:32 +0200 Subject: Only make Upgradable() return true for packages with a candidate If there is no candidate, the package should not be considered upgradeable. LP: #896689 --- apt-pkg/depcache.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apt-pkg/depcache.h') diff --git a/apt-pkg/depcache.h b/apt-pkg/depcache.h index aa281f695..6a1d6f8b3 100644 --- a/apt-pkg/depcache.h +++ b/apt-pkg/depcache.h @@ -250,7 +250,7 @@ class pkgDepCache : protected pkgCache::Namespace inline bool Keep() const {return Mode == ModeKeep;}; inline bool Protect() const {return (iFlags & Protected) == Protected;}; inline bool Upgrade() const {return Status > 0 && Mode == ModeInstall;}; - inline bool Upgradable() const {return Status >= 1;}; + inline bool Upgradable() const {return Status >= 1 && CandidateVer != NULL;}; inline bool Downgrade() const {return Status < 0 && Mode == ModeInstall;}; inline bool Held() const {return Status != 0 && Keep();}; inline bool NowBroken() const {return (DepState & DepNowMin) != DepNowMin;}; -- cgit v1.2.3