diff options
author | Michael Vogt <mvo@debian.org> | 2014-05-07 17:55:10 +0200 |
---|---|---|
committer | Michael Vogt <mvo@debian.org> | 2014-05-07 17:55:10 +0200 |
commit | 38d2959ffb8c6f5f291b2910014a67b1b352ab4c (patch) | |
tree | c5977b8f34aaf973ed3956952ec3ff43ac59f143 /apt-private/private-cacheset.cc | |
parent | fce69e7a0f38299c57ef96ae1c1dd9a5379bfd5a (diff) | |
parent | 3fa4e98f62e469f4292d2811b4e15f4afb678fbd (diff) |
Merge branch 'debian/sid' into debian/experimental
Conflicts:
apt-pkg/cachefilter.h
apt-pkg/contrib/fileutl.cc
apt-pkg/contrib/netrc.h
apt-pkg/deb/debsrcrecords.cc
apt-pkg/init.h
apt-pkg/pkgcache.cc
debian/apt.install.in
debian/changelog
Diffstat (limited to 'apt-private/private-cacheset.cc')
-rw-r--r-- | apt-private/private-cacheset.cc | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/apt-private/private-cacheset.cc b/apt-private/private-cacheset.cc index a7dc0e800..e37e7b227 100644 --- a/apt-private/private-cacheset.cc +++ b/apt-private/private-cacheset.cc @@ -1,9 +1,18 @@ +#include <config.h> + #include <apt-pkg/cachefile.h> #include <apt-pkg/pkgcache.h> #include <apt-pkg/depcache.h> -#include <apt-pkg/strutl.h> +#include <apt-pkg/cacheiterators.h> +#include <apt-pkg/configuration.h> +#include <apt-pkg/progress.h> +#include <apt-pkg/policy.h> + +#include <apt-private/private-cacheset.h> + +#include <stddef.h> -#include "private-cacheset.h" +#include <apti18n.h> bool GetLocalitySortedVersionSet(pkgCacheFile &CacheFile, LocalitySortedVersionSet &output_set, @@ -64,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(); |