From 529bf9b00dfd3c0472d77e9515007e52a3557bc4 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 20 Jan 2016 15:49:46 +0100 Subject: 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 --- apt-pkg/depcache.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'apt-pkg/depcache.cc') 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) { -- cgit v1.2.3