summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2015-08-12 13:10:32 +0200
committerJulian Andres Klode <jak@debian.org>2015-08-12 13:10:32 +0200
commit32cc424bf5e99c101cfa350e18127cbcafddd8a9 (patch)
treea793101bad8eb93f314718864ab607ca453c1cc5 /apt-pkg
parente595c45791716891b7b21292926f9913b333009d (diff)
Only make Upgradable() return true for packages with a candidate
If there is no candidate, the package should not be considered upgradeable. LP: #896689
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/depcache.h2
1 files changed, 1 insertions, 1 deletions
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;};