[packages/poldek] Rel 4

arekm arekm at pld-linux.org
Sun Apr 12 22:53:23 CEST 2026


commit d0226c1cb0de9b8f759d6890562e8ff7bea23ae1
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Sun Apr 12 22:53:03 2026 +0200

    Rel 4

 poldek-nocolor-cmp.patch | 56 ++++++++++++++++++++++++++++++++++++++++++++++++
 poldek.spec              | 12 ++++++-----
 2 files changed, 63 insertions(+), 5 deletions(-)
---
diff --git a/poldek.spec b/poldek.spec
index 1c735be..0952824 100644
--- a/poldek.spec
+++ b/poldek.spec
@@ -22,7 +22,7 @@
 %define		ver_rpm		1:4.14
 %endif
 
-%define		rel	3
+%define		rel	4
 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
@@ -52,6 +52,7 @@ Patch0:		%{name}-config.patch
 Patch1:		pm-hooks.patch
 Patch2:		%{name}-ext-down-enable.patch
 Patch3:		%{name}-search-i-opt.patch
+Patch4:		%{name}-nocolor-cmp.patch
 URL:		http://poldek.pld-linux.org/
 %{?with_rpm5:BuildRequires:	%{db_pkg}-devel >= %{ver_db}}
 BuildRequires:	autoconf >= 2.63
@@ -224,10 +225,11 @@ Moduły języka Python dla poldka.
 
 %prep
 %setup -q
-%patch -P 0 -p1
-%patch -P 1 -p1
-%patch -P 2 -p1
-%patch -P 3 -p1
+%patch -P0 -p1
+%patch -P1 -p1
+%patch -P2 -p1
+%patch -P3 -p1
+%patch -P4 -p1
 
 %{__rm} doc/poldek.info
 %{__rm} m4/libtool.m4 m4/lt*.m4
diff --git a/poldek-nocolor-cmp.patch b/poldek-nocolor-cmp.patch
new file mode 100644
index 0000000..abfa538
--- /dev/null
+++ b/poldek-nocolor-cmp.patch
@@ -0,0 +1,56 @@
+    fix: do not treat uncolored packages from different architectures as interchangeable
+    
+    -devel packages typically have HEADERCOLOR=0 (no ELF binaries, only
+    headers, symlinks, pkg-config and libtool files). pkg_is_colored_like()
+    was returning 1 ("same kind") whenever at least one package had color 0,
+    causing poldek to incorrectly obsolete e.g. xz-devel.x32 when installing
+    xz-devel.x86_64, even though they install to different paths
+    (/usr/libx32 vs /usr/lib64) and are not interchangeable.
+    
+    The uncolored fallback was changed to a blanket "return 1" in commit
+    dad87fe8 (LP#299685, 2010). The earlier commit 1fd8aa21 (2008) disabled
+    arch-based fallback with the comment "rpm relies on colors only".
+    
+    Regardless of what older RPM versions did, RPM 6.0.1's checkAdded() and
+    rpmtsTeIterator() (lib/depends.cc) use arch string matching as a second
+    layer alongside colors in multilib transactions.
+    
+    Fix pkg_is_colored_like() to fall back to arch comparison when at least
+    one package is uncolored, and remove the redundant "any uncolored"
+    bypass in obs_filter() which was a second path for the same bug.
+
+diff --git a/install3/obsoletes.c b/install3/obsoletes.c
+index c70c04da..d137aeac 100644
+--- a/install3/obsoletes.c
++++ b/install3/obsoletes.c
+@@ -132,10 +132,6 @@ int obs_filter(struct pkgdb *db, const struct pm_dbrec *dbrec, void *apkg)
+     if (pkg_is_colored_like(&dbpkg, pkg))
+         return 1;
+ 
+-    /* any uncolored -> rpm allows upgrade */
+-    if (dbpkg.color == 0 || pkg->color == 0)
+-        return 1;
+-
+     return 0;
+ }
+ 
+diff --git a/pkgcmp.c b/pkgcmp.c
+index aa8af162..e75ddf5b 100644
+--- a/pkgcmp.c
++++ b/pkgcmp.c
+@@ -80,8 +80,13 @@ int pkg_is_colored_like(const struct pkg *candidate, const struct pkg *pkg)
+     if (pkg->color && candidate->color)
+         return (pkg->color & candidate->color) > 0;
+ 
+-    /* either new or old package contains no binary files, let it happen */
+-    return 1;
++    /* When at least one package has no ELF binaries (color 0), fall back
++       to arch comparison. This prevents treating uncolored packages from
++       different architectures (e.g. x32 vs x86_64 -devel packages) as
++       interchangeable. RPM 6.0.1 itself uses arch string matching as a
++       second layer alongside colors (see checkAdded() and
++       rpmtsTeIterator() in rpm's lib/depends.cc). */
++    return pkg_cmp_same_arch(candidate, pkg);
+ }
+ 
+ /* ret : 1 if pkg is cappable to upgrade arch<=>arch, arch<=>noarch */
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/poldek.git/commitdiff/d0226c1cb0de9b8f759d6890562e8ff7bea23ae1



More information about the pld-cvs-commit mailing list