summaryrefslogtreecommitdiff
path: root/apt-private/private-cacheset.cc
diff options
context:
space:
mode:
authorMichael Vogt <mvo@debian.org>2014-04-25 13:51:50 +0200
committerMichael Vogt <mvo@debian.org>2014-04-25 13:51:50 +0200
commit15ccc2a685b0b884b393e356f9960e86f97f532d (patch)
tree920a1fcf6fa2c92a05d0d1d2ccb22eb32b88522e /apt-private/private-cacheset.cc
parenta40c6649b99814c7d30964accdd5ecc4f1ce369a (diff)
parent506ab3c78fb67f5e452a1748f4870af767de5ebb (diff)
Merge branch 'debian/sid' into ubuntu/master
Conflicts: debian/changelog
Diffstat (limited to 'apt-private/private-cacheset.cc')
-rw-r--r--apt-private/private-cacheset.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/apt-private/private-cacheset.cc b/apt-private/private-cacheset.cc
index 4a63c7e81..e37e7b227 100644
--- a/apt-private/private-cacheset.cc
+++ b/apt-private/private-cacheset.cc
@@ -73,7 +73,13 @@ bool GetLocalitySortedVersionSet(pkgCacheFile &CacheFile,
else
{
pkgPolicy *policy = CacheFile.GetPolicy();
- output_set.insert(policy->GetCandidateVer(P));
+ if (policy->GetCandidateVer(P).IsGood())
+ output_set.insert(policy->GetCandidateVer(P));
+ else
+ // no candidate, this may happen for packages in
+ // dpkg "deinstall ok config-file" state - we pick the first ver
+ // (which should be the only one)
+ output_set.insert(P.VersionList());
}
}
progress.Done();