From 422d73e54ac795cf6754ec659c4b4888ac0afa94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Wed, 9 Nov 2022 15:09:12 +0700 Subject: [PATCH] gen-runtime-deps: verify rdeps for shlib_requires too While we're at it, mark one more variables as local --- common/hooks/pre-pkg/04-generate-runtime-deps.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/common/hooks/pre-pkg/04-generate-runtime-deps.sh b/common/hooks/pre-pkg/04-generate-runtime-deps.sh index eb19ebfe7081..9d28ac18f774 100644 --- a/common/hooks/pre-pkg/04-generate-runtime-deps.sh +++ b/common/hooks/pre-pkg/04-generate-runtime-deps.sh @@ -46,7 +46,7 @@ store_pkgdestdir_rundeps() { } hook() { - local depsftmp f lf j mapshlibs sorequires _curdep elfmagic + local depsftmp f lf j mapshlibs sorequires _curdep elfmagic verify_deps # Disable trap on ERR, xbps-uhelper cmd might return error... but not something # to be worried about because if there are broken shlibs this hook returns @@ -63,6 +63,10 @@ hook() { depsftmp=$(mktemp) || exit 1 find ${PKGDESTDIR} -type f -perm -u+w > $depsftmp 2>/dev/null + for f in ${shlib_requires}; do + verify_deps+=" ${f}" + done + exec 3<&0 # save stdin exec < $depsftmp while read f; do @@ -161,9 +165,6 @@ hook() { store_pkgdestdir_rundeps - for f in ${shlib_requires}; do - sorequires+="${f} " - done if [ -n "${sorequires}" ]; then echo "${sorequires}" | xargs -n1 | sort | xargs > ${PKGDESTDIR}/shlib-requires fi