SHA256
3
0
forked from pool/dpkg
dpkg/0001-In-case-of-equal-priority-rather-update.patch
Tomáš Chvátal 8f7f8b5cc0 - Fix bnc#969171 by updating even with equal priority
* 0001-In-case-of-equal-priority-rather-update.patch

- Fix bnc#969171 by updating even with equal priority
  * 0001-In-case-of-equal-priority-rather-update.patch

OBS-URL: https://build.opensuse.org/package/show/system:packagemanager/dpkg?expand=0&rev=31
2016-04-06 18:21:31 +00:00

31 lines
1.0 KiB
Diff

From 9f73659ce9b9194ce2f0219afbfb77d27e90508b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= <tchvatal@suse.com>
Date: Wed, 6 Apr 2016 20:06:15 +0200
Subject: [PATCH] In case of equal priority rather update
This is needed because in some cases priorities in openSUSE python
packages were equal in priority yet pointing to different files.
With forced refresh we unfortunately update in some un-needed cases
but are safe against this kind of errors.
---
utils/update-alternatives.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/utils/update-alternatives.c b/utils/update-alternatives.c
index 5dc3213..1af65a4 100644
--- a/utils/update-alternatives.c
+++ b/utils/update-alternatives.c
@@ -1437,7 +1437,8 @@ alternative_get_best(struct alternative *a)
best = a->choices;
for (fs = a->choices; fs; fs = fs->next)
- if (fs->priority > best->priority)
+ /* In case of equal priority rather use the new alternative */
+ if (fs->priority >= best->priority)
best = fs;
return best;
--
2.7.4