From: David Kalnischkies Date: Wed, 20 Jan 2016 14:49:46 +0000 (+0100) Subject: prefer upgrading installed provides satisfier X-Git-Tag: 1.2.2~33 X-Git-Url: https://git.saurik.com/apt.git/commitdiff_plain/529bf9b00dfd3c0472d77e9515007e52a3557bc4?hp=bc6b2bfa08fe5fb8eff65d04d81302d161956641 prefer upgrading installed provides satisfier If you have chosen to install a foreign architecture provider it is more reasonable to keep this provider instead of removing this one to replace it with a newer version from a (usually) more preferred arch. Git-Dch: Ignore --- diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc index c6fb63be1..8281949f9 100644 --- a/apt-pkg/depcache.cc +++ b/apt-pkg/depcache.cc @@ -1016,6 +1016,8 @@ struct CompareProviders { if (instA != instB) return instA == false; } + if ((A->CurrentVer == 0 || B->CurrentVer == 0) && A->CurrentVer != B->CurrentVer) + return A->CurrentVer == 0; // Prefer packages in the same group as the target; e.g. foo:i386, foo:amd64 if (A->Group != B->Group) {