From f6c46a3c993cac0391b3c635f263f2c57d6dd95b Mon Sep 17 00:00:00 2001 From: Juan RP Date: Sun, 20 Jul 2014 11:18:21 +0200 Subject: [PATCH] hooks/post-install/prepare-32bit: fix rdep conversion with subpkgs. If a required dependency is a subpackage and it does not contain shlib-provides, do not convert to 32bit. This fixes the issue of gtk+-32bit requiring gtk-update-icon-cache-32bit, which was simply wrong because the latter does not provide any shlib. --- common/hooks/post-install/06-prepare-32bit.sh | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/common/hooks/post-install/06-prepare-32bit.sh b/common/hooks/post-install/06-prepare-32bit.sh index 5d903bc47fe..e14f0fb5c37 100644 --- a/common/hooks/post-install/06-prepare-32bit.sh +++ b/common/hooks/post-install/06-prepare-32bit.sh @@ -124,13 +124,14 @@ hook() { printf "${pkgn}${pkgv} " >> ${destdir32}/rdeps fi else - # XXX - # dependency is a subpkg, assume shlib-provides exists. - # The issue is that subpkgs are processed in alphabetical - # order and a required subpkg might not be processed at this - # point. - echo " RDEP: $f -> ${pkgn}-32bit${pkgv}" - printf "${pkgn}-32bit${pkgv} " >> ${destdir32}/rdeps + if [ -s ${XBPS_DESTDIR}/${pkgn}-32bit-${version}/shlib-provides ]; then + # Dependency is a subpkg; check if it provides any shlib + # and convert to 32bit if true. + echo " RDEP: $f -> ${pkgn}-32bit${pkgv}" + printf "${pkgn}-32bit${pkgv} " >> ${destdir32}/rdeps + else + printf "${pkgn}${pkgv} " >> ${destdir32}/rdeps + fi fi done fi