]> TLD Linux GIT Repositories - packages/poldek.git/blobdiff - poldek-multiarch-x32.patch
- 0.42.2 from PLD with rpm.org RPM support
[packages/poldek.git] / poldek-multiarch-x32.patch
diff --git a/poldek-multiarch-x32.patch b/poldek-multiarch-x32.patch
new file mode 100644 (file)
index 0000000..50b7136
--- /dev/null
@@ -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);