From: Julian Andres Klode Date: Wed, 12 Aug 2015 11:10:32 +0000 (+0200) Subject: Only make Upgradable() return true for packages with a candidate X-Git-Tag: 1.1.exp9~55 X-Git-Url: https://git.saurik.com/apt.git/commitdiff_plain/32cc424bf5e99c101cfa350e18127cbcafddd8a9?ds=inline Only make Upgradable() return true for packages with a candidate If there is no candidate, the package should not be considered upgradeable. LP: #896689 --- 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;};