From 38798235784f271cdb3e99954c1a28222d2e5999 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Fri, 8 Sep 2023 11:54:04 +0700 Subject: [PATCH] 98-shlib-provides: handle special 32bit packages If the packages has -32bit suffix and there's another subpackages with same name. It's definitely not a normal package. --- common/hooks/post-install/98-shlib-provides.sh | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/common/hooks/post-install/98-shlib-provides.sh b/common/hooks/post-install/98-shlib-provides.sh index ad1c31c72db..a2ccff794b2 100644 --- a/common/hooks/post-install/98-shlib-provides.sh +++ b/common/hooks/post-install/98-shlib-provides.sh @@ -66,9 +66,23 @@ collect_sonames() { hook() { local _destdir32=${XBPS_DESTDIR}/${pkgname}-32bit-${version} + local _mainpkg=yes + local _pkg + + case "$pkgname" in + *-32bit) + _pkgname=${pkgname%-32bit} + for _pkg in $sourcepkg $subpackages; do + if [ "$_pkg" = "$_pkgname" ]; then + _mainpkg= + break + fi + done + ;; + esac # native pkg - collect_sonames ${PKGDESTDIR} yes + collect_sonames ${PKGDESTDIR} $_mainpkg # 32bit pkg collect_sonames ${_destdir32} }