mirror of
https://github.com/moparisthebest/pacman
synced 2024-12-22 15:58:50 -05:00
makepkg: fix sourcing BUILDSCRIPT and PATH issues
The bash source command looks in the users PATH for the file to source before the local directory. This causes issues when someone has a PKGBUILD somewhere in their path (for unknown some reason...). Fixes FS#14727. Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
parent
5e32928a42
commit
250e66e57b
@ -1527,6 +1527,7 @@ if [ ! -f "$BUILDSCRIPT" ]; then
|
||||
else
|
||||
# PKGBUILD passed through a pipe
|
||||
BUILDSCRIPT=/dev/stdin
|
||||
source "$BUILDSCRIPT"
|
||||
fi
|
||||
else
|
||||
crlftest=$(file $BUILDSCRIPT | grep -F 'CRLF' || true)
|
||||
@ -1534,9 +1535,9 @@ else
|
||||
error "$(gettext "%s contains CRLF characters and cannot be sourced.")" "$BUILDSCRIPT"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
source "$BUILDSCRIPT"
|
||||
source ./"$BUILDSCRIPT"
|
||||
fi
|
||||
|
||||
if [ "$GENINTEG" -eq 1 ]; then
|
||||
mkdir -p "$srcdir"
|
||||
|
Loading…
Reference in New Issue
Block a user