summaryrefslogtreecommitdiff
path: root/apt-private/private-cacheset.cc
diff options
context:
space:
mode:
Diffstat (limited to 'apt-private/private-cacheset.cc')
-rw-r--r--apt-private/private-cacheset.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/apt-private/private-cacheset.cc b/apt-private/private-cacheset.cc
index e37e7b227..159e1d8f1 100644
--- a/apt-private/private-cacheset.cc
+++ b/apt-private/private-cacheset.cc
@@ -55,7 +55,10 @@ bool GetLocalitySortedVersionSet(pkgCacheFile &CacheFile,
}
else if (_config->FindB("APT::Cmd::Upgradable") == true)
{
- if(P.CurrentVer() && state.Upgradable())
+ pkgPolicy *policy = CacheFile.GetPolicy();
+ if(P.CurrentVer() &&
+ state.Upgradable() &&
+ policy->GetCandidateVer(P) != P.CurrentVer())
{
pkgPolicy *policy = CacheFile.GetPolicy();
output_set.insert(policy->GetCandidateVer(P));