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.
This commit is contained in:
Juan RP 2014-07-20 11:18:21 +02:00
parent fdfe52a426
commit f6c46a3c99

View file

@ -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