summaryrefslogtreecommitdiff
path: root/apt-pkg/depcache.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2016-01-20 15:49:46 +0100
committerDavid Kalnischkies <david@kalnischkies.de>2016-01-25 18:15:44 +0100
commit529bf9b00dfd3c0472d77e9515007e52a3557bc4 (patch)
treefb43620b9af74ba5ef289f1136ada4c2b0a6820e /apt-pkg/depcache.cc
parentbc6b2bfa08fe5fb8eff65d04d81302d161956641 (diff)
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
Diffstat (limited to 'apt-pkg/depcache.cc')
-rw-r--r--apt-pkg/depcache.cc2
1 files changed, 2 insertions, 0 deletions
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)
{