diff options
author | Andrew J. Hesford <ajh@sideband.org> | 2022-11-30 16:11:30 +0000 |
---|---|---|
committer | Andrew J. Hesford <ajh@sideband.org> | 2022-11-30 16:15:57 +0000 |
commit | 7436cebdd5e027d7b7e144e0dc403934c1d616db (patch) | |
tree | 890c5f86e86c8198b63e0d0a578c99daf35d1fda | |
parent | 3cd1d19920f41b08c4cc7f31ee80c04641f7f46e (diff) | |
download | void-packages-7436cebdd5e027d7b7e144e0dc403934c1d616db.tar void-packages-7436cebdd5e027d7b7e144e0dc403934c1d616db.tar.gz void-packages-7436cebdd5e027d7b7e144e0dc403934c1d616db.tar.bz2 void-packages-7436cebdd5e027d7b7e144e0dc403934c1d616db.tar.lz void-packages-7436cebdd5e027d7b7e144e0dc403934c1d616db.tar.xz void-packages-7436cebdd5e027d7b7e144e0dc403934c1d616db.tar.zst void-packages-7436cebdd5e027d7b7e144e0dc403934c1d616db.zip |
pre-pkg/04-generate-runtime-deps.sh: avoid conflict with `broken` template var
Using a non-local `broken` variable in the hook
common/hooks/prepkg/04-generate-runtime-deps.sh
will cause a spurious shlib error when building templates marked broken
are built with `xbps-src -b`. Declaring the variable local is
sufficient, but let's make the name a bit more distinctive anyway.
-rw-r--r-- | common/hooks/pre-pkg/04-generate-runtime-deps.sh | 8 |
1 files changed, 4 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 eb19ebfe708..8eace6c683e 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 broken_shlibs # 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 @@ -100,7 +100,7 @@ hook() { soname=$(find ${PKGDESTDIR} -name "$f") if [ -z "$soname" ]; then msg_red_nochroot " SONAME: $f <-> UNKNOWN PKG PLEASE FIX!\n" - broken=1 + broken_shlibs=1 else echo " SONAME: $f <-> $pkgname (ignored)" fi @@ -129,7 +129,7 @@ hook() { _rdepver=$($XBPS_UHELPER_CMD getpkgversion "${_rdep}" 2>/dev/null) if [ -z "${_pkgname}" -o -z "${_rdepver}" ]; then msg_red_nochroot " SONAME: $f <-> UNKNOWN PKG PLEASE FIX!\n" - broken=1 + broken_shlibs=1 continue fi # Check if pkg is a subpkg of sourcepkg; if true, ignore version @@ -155,7 +155,7 @@ hook() { # # If pkg uses any unknown SONAME error out. # - if [ -n "$broken" -a -z "$allow_unknown_shlibs" ]; then + if [ -n "$broken_shlibs" -a -z "$allow_unknown_shlibs" ]; then msg_error "$pkgver: cannot guess required shlibs, aborting!\n" fi |