hooks/prepare-32bit: take into account subpkgs to transform rdeps.
This is not perfect but will work in 90% of existing cases.
This commit is contained in:
parent
7824268597
commit
1de0985964
1 changed files with 25 additions and 6 deletions
|
@ -87,7 +87,7 @@ hook() {
|
||||||
_deps="$(cat ${PKGDESTDIR}/rdeps)"
|
_deps="$(cat ${PKGDESTDIR}/rdeps)"
|
||||||
fi
|
fi
|
||||||
for f in ${_deps}; do
|
for f in ${_deps}; do
|
||||||
unset pkgn pkgv _arch _shprovides
|
unset found pkgn pkgv _arch _shprovides
|
||||||
|
|
||||||
pkgn="$($XBPS_UHELPER_CMD getpkgdepname $f)"
|
pkgn="$($XBPS_UHELPER_CMD getpkgdepname $f)"
|
||||||
if [ -z "${pkgn}" ]; then
|
if [ -z "${pkgn}" ]; then
|
||||||
|
@ -107,12 +107,31 @@ hook() {
|
||||||
fi
|
fi
|
||||||
# If dependency does not have "shlib-provides" do not
|
# If dependency does not have "shlib-provides" do not
|
||||||
# change it to 32bit.
|
# change it to 32bit.
|
||||||
_shprovides="$($XBPS_QUERY_CMD -R --property=shlib-provides "$f")"
|
for x in ${subpackages}; do
|
||||||
if [ -z "${_shprovides}" ]; then
|
if [ "$x" = "$pkgn" ]; then
|
||||||
printf "${pkgn}${pkgv} " >> ${destdir32}/rdeps
|
found=1
|
||||||
continue
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
if [ -z "$found" ]; then
|
||||||
|
# Dependency is not a subpkg, check shlib-provides
|
||||||
|
# via binpkgs.
|
||||||
|
_shprovides="$($XBPS_QUERY_CMD -R --property=shlib-provides "$f")"
|
||||||
|
if [ -n "${_shprovides}" ]; then
|
||||||
|
echo " RDEP: $f -> ${pkgn}-32bit${pkgv}"
|
||||||
|
printf "${pkgn}-32bit${pkgv} " >> ${destdir32}/rdeps
|
||||||
|
else
|
||||||
|
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
|
||||||
fi
|
fi
|
||||||
printf "${pkgn}-32bit${pkgv} " >> $destdir32/rdeps
|
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue