xbps-triggers: do not set PATH, fix search for dkms script

Setting PATH to something relative breaks builds with new dkms, and
isn't correct behavior because the dkms script changes directories.

Fixes: #56044.
This commit is contained in:
Andrew J. Hesford 2025-06-30 13:17:54 -04:00
parent 508dbc6189
commit 885f745198
2 changed files with 4 additions and 11 deletions

View file

@ -18,8 +18,6 @@ PKGNAME="$3"
VERSION="$4" VERSION="$4"
UPDATE="$5" UPDATE="$5"
export PATH="usr/bin:usr/sbin:/usr/sbin:/usr/bin:/sbin:/bin"
remove_modules() { remove_modules() {
# Remove the specified modules from all kernels. # Remove the specified modules from all kernels.
set -- ${dkms_modules} set -- ${dkms_modules}
@ -120,15 +118,10 @@ targets)
echo "post-install pre-remove" echo "post-install pre-remove"
;; ;;
run) run)
if [ -x /usr/bin/dkms ]; then [ -z "${dkms_modules}" ] && exit 0
DKMS=/usr/bin/dkms
elif [ -x /usr/sbin/dkms ]; then
DKMS=/usr/sbin/dkms
else
exit 0
fi
[ ! -x $DKMS -o -z "$dkms_modules" ] && exit 0 DKMS=usr/bin/dkms
[ -x "${DKMS}" ] || exit 0
case "$TARGET" in case "$TARGET" in
post-install) post-install)

View file

@ -1,6 +1,6 @@
# Template file for 'xbps-triggers' # Template file for 'xbps-triggers'
pkgname=xbps-triggers pkgname=xbps-triggers
version=0.128 version=0.129
revision=1 revision=1
bootstrap=yes bootstrap=yes
short_desc="XBPS triggers for Void Linux" short_desc="XBPS triggers for Void Linux"