summaryrefslogtreecommitdiff
path: root/apt-private/private-output.cc
diff options
context:
space:
mode:
authorMichael Vogt <mvo@ubuntu.com>2014-07-08 16:06:56 +0200
committerMichael Vogt <mvo@ubuntu.com>2014-07-08 16:06:56 +0200
commit7d1b93d94083a3856efc821bacd9e91f80bbf760 (patch)
tree7ef43941a22c71d8a16efa50e0015426e9d3e53c /apt-private/private-output.cc
parent521dd27dc33c8b2a6947a76872841f4254df4e58 (diff)
Only show packages as upgradable if the have a CandidateVer != 0
Closes: #753297
Diffstat (limited to 'apt-private/private-output.cc')
-rw-r--r--apt-private/private-output.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/apt-private/private-output.cc b/apt-private/private-output.cc
index 158bd5c71..7f8922138 100644
--- a/apt-private/private-output.cc
+++ b/apt-private/private-output.cc
@@ -118,7 +118,7 @@ static std::string GetFlagsStr(pkgCacheFile &CacheFile, pkgCache::PkgIterator P)
std::string flags_str;
if (state.NowBroken())
flags_str = "B";
- if (P.CurrentVer() && state.Upgradable())
+ if (P.CurrentVer() && state.Upgradable() && state.CandidateVer != NULL)
flags_str = "g";
else if (P.CurrentVer() != NULL)
flags_str = "i";
@@ -229,7 +229,8 @@ void ListSingleVersion(pkgCacheFile &CacheFile, pkgRecords &records, /*{{{*/
std::string CandidateVerStr = GetCandidateVersion(CacheFile, P);
std::string InstalledVerStr = GetInstalledVersion(CacheFile, P);
std::string StatusStr;
- if(P.CurrentVer() == V && state.Upgradable()) {
+ if(P.CurrentVer() == V && state.Upgradable() && state.CandidateVer != NULL)
+ {
strprintf(StatusStr, _("[installed,upgradable to: %s]"),
CandidateVerStr.c_str());
} else if (P.CurrentVer() == V) {