common/hooks/pre-pkg/04-generate-runtime-deps.sh: sort deps for reproducibility

fixes #36641
This commit is contained in:
classabbyamp 2022-04-12 15:28:23 -04:00 committed by Echo
parent cbbcbc5dd3
commit 5ec2556004
1 changed files with 5 additions and 6 deletions

View File

@ -34,15 +34,14 @@ add_rundep() {
store_pkgdestdir_rundeps() {
if [ -n "$run_depends" ]; then
: > ${PKGDESTDIR}/rdeps
for f in ${run_depends}; do
_curdep="$(echo "$f" | sed -e 's,\(.*\)?.*,\1,')"
if [ -z "$($XBPS_UHELPER_CMD getpkgdepname ${_curdep} 2>/dev/null)" -a \
-z "$($XBPS_UHELPER_CMD getpkgname ${_curdep} 2>/dev/null)" ]; then
_curdep="${_curdep}>=0"
fi
printf -- "${_curdep} " >> ${PKGDESTDIR}/rdeps
done
printf -- "${_curdep}\n"
done | sort | xargs > ${PKGDESTDIR}/rdeps
fi
}
@ -145,7 +144,7 @@ hook() {
if [ "${_pkgname}" != "${pkgname}" ]; then
echo " SONAME: $f <-> ${_sdep}"
sorequires+="${f} "
sorequires+="${f}\n"
else
# Ignore libs by current pkg
echo " SONAME: $f <-> ${_rdep} (ignored)"
@ -163,9 +162,9 @@ hook() {
store_pkgdestdir_rundeps
for f in ${shlib_requires}; do
sorequires+="${f} "
sorequires+="${f}\n"
done
if [ -n "${sorequires}" ]; then
echo "${sorequires}" > ${PKGDESTDIR}/shlib-requires
echo "${sorequires}" | sort | xargs > ${PKGDESTDIR}/shlib-requires
fi
}