Просмотр исходного кода

Only make Upgradable() return true for packages with a candidate

If there is no candidate, the package should not be considered
upgradeable.

LP: #896689
Julian Andres Klode лет назад: 11
Родитель
Сommit
32cc424bf5
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      apt-pkg/depcache.h

+ 1 - 1
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;};