- 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
This commit is contained in:
committed by
Git OBS Bridge
parent
62f21a3cc6
commit
8f7f8b5cc0
30
0001-In-case-of-equal-priority-rather-update.patch
Normal file
30
0001-In-case-of-equal-priority-rather-update.patch
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
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
|
||||||
|
|
@@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Apr 6 18:20:13 UTC 2016 - tchvatal@suse.com
|
||||||
|
|
||||||
|
- Fix bnc#969171 by updating even with equal priority
|
||||||
|
* 0001-In-case-of-equal-priority-rather-update.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Mar 25 09:49:52 UTC 2016 - tchvatal@suse.com
|
Fri Mar 25 09:49:52 UTC 2016 - tchvatal@suse.com
|
||||||
|
|
||||||
|
@@ -30,6 +30,8 @@ Source3: sensible-editor
|
|||||||
Patch1: update-alternatives-suse.patch
|
Patch1: update-alternatives-suse.patch
|
||||||
# PATCH-FIX-UPSTREAM remove --utf8 since we only build En manpages.
|
# PATCH-FIX-UPSTREAM remove --utf8 since we only build En manpages.
|
||||||
Patch6: dpkg-sparc.diff
|
Patch6: dpkg-sparc.diff
|
||||||
|
# PATCH-FIX-SUSE: update if two alternatives have same priority bnc#969171
|
||||||
|
Patch7: 0001-In-case-of-equal-priority-rather-update.patch
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
BuildRequires: libbz2-devel
|
BuildRequires: libbz2-devel
|
||||||
BuildRequires: libselinux-devel
|
BuildRequires: libselinux-devel
|
||||||
@@ -78,6 +80,7 @@ Libraries and header files for dpkg.
|
|||||||
%setup -q
|
%setup -q
|
||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
%patch6 -p1
|
%patch6 -p1
|
||||||
|
%patch7 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
export CFLAGS="%{optflags}"
|
export CFLAGS="%{optflags}"
|
||||||
|
@@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Apr 6 18:20:13 UTC 2016 - tchvatal@suse.com
|
||||||
|
|
||||||
|
- Fix bnc#969171 by updating even with equal priority
|
||||||
|
* 0001-In-case-of-equal-priority-rather-update.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Apr 6 12:05:23 UTC 2016 - tchvatal@suse.com
|
Wed Apr 6 12:05:23 UTC 2016 - tchvatal@suse.com
|
||||||
|
|
||||||
|
@@ -28,6 +28,8 @@ Source0: http://ftp.de.debian.org/debian/pool/main/d/dpkg/dpkg_%{version}
|
|||||||
Source3: sensible-editor
|
Source3: sensible-editor
|
||||||
Patch0: update-alternatives-suse.patch
|
Patch0: update-alternatives-suse.patch
|
||||||
Patch6: dpkg-sparc.diff
|
Patch6: dpkg-sparc.diff
|
||||||
|
# PATCH-FIX-SUSE: update if two alternatives have same priority bnc#969171
|
||||||
|
Patch7: 0001-In-case-of-equal-priority-rather-update.patch
|
||||||
BuildRequires: ncurses-devel
|
BuildRequires: ncurses-devel
|
||||||
BuildRequires: xz
|
BuildRequires: xz
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
@@ -47,6 +49,7 @@ particular preference.
|
|||||||
%setup -q -n dpkg-%{version}
|
%setup -q -n dpkg-%{version}
|
||||||
%patch0 -p1
|
%patch0 -p1
|
||||||
%patch6 -p1
|
%patch6 -p1
|
||||||
|
%patch7 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%configure \
|
%configure \
|
||||||
|
Reference in New Issue
Block a user