From 7a518e0eafac021c52a19897ad5e80f54e310354 Mon Sep 17 00:00:00 2001 From: mis Date: Wed, 29 Apr 2020 10:53:53 +0200 Subject: [PATCH] - gh#10 fix; rel 3 --- poldek-multiarch-x32.patch | 18 ++++++++++++++++++ poldek.spec | 4 +++- 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 poldek-multiarch-x32.patch diff --git a/poldek-multiarch-x32.patch b/poldek-multiarch-x32.patch new file mode 100644 index 0000000..50b7136 --- /dev/null +++ b/poldek-multiarch-x32.patch @@ -0,0 +1,18 @@ +diff --git a/pkg.c b/pkg.c +index 9e1bf9c..ed62efd 100644 +--- a/pkg.c ++++ b/pkg.c +@@ -74,8 +74,11 @@ int pkgmod_register_arch(const char *arch) + + an_arch->score = pm_architecture_score(arch); + n_assert(an_arch->score >= 0); +- if (!an_arch->score) /* make it most less preferred */ +- an_arch->score = INT_MAX - 1; ++ if (an_arch->score == 0) { ++ /* make it most less preferred, but differ from other zero-scored ++ archs (i686 and x86_64 on x32 case) */ ++ an_arch->score = INT_MAX - n_array_size(architecture_a) - 1; ++ } + DBGF("register %s with score %d\n", arch, an_arch->score); + + memcpy(an_arch->arch, arch, len + 1); diff --git a/poldek.spec b/poldek.spec index 9aaf94e..691d5a5 100644 --- a/poldek.spec +++ b/poldek.spec @@ -25,7 +25,7 @@ %define ver_rpm 5.4.10 %endif -%define rel 2 +%define rel 3 Summary: RPM packages management helper tool Summary(hu.UTF-8): RPM csomagkezelést segítő eszköz Summary(pl.UTF-8): Pomocnicze narzędzie do zarządzania pakietami RPM @@ -56,6 +56,7 @@ Patch1: pm-hooks.patch Patch2: %{name}-ext-down-enable.patch Patch3: %{name}-pc.patch Patch4: %{name}-info.patch +Patch5: %{name}-multiarch-x32.patch URL: http://poldek.pld-linux.org/ BuildRequires: %{db_pkg}-devel >= %{ver_db} BuildRequires: autoconf >= 2.63 @@ -229,6 +230,7 @@ Moduły języka Python dla poldka. %patch2 -p1 %patch3 -p1 %patch4 -p1 +%patch5 -p1 %{__rm} doc/poldek.info %{__rm} m4/libtool.m4 m4/lt*.m4 -- 2.44.0