makepkg: remove sourcing PKGBUILD from stdin

Using PKGBUILDs from stdin means that we can not use pkgver() in
packages.  Given we have the "-p" option to pass any file to
makepkg and passing a PKGBUILD in the form "cat foo | makepkg"
does not work, this feature is unneeded.

Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
Allan McRae 2013-05-18 22:47:35 +10:00
parent 296e630edd
commit 28dd29dedb
1 changed files with 2 additions and 8 deletions

View File

@ -2760,14 +2760,8 @@ unset makedepends optdepends options noextract
BUILDFILE=${BUILDFILE:-$BUILDSCRIPT}
if [[ ! -f $BUILDFILE ]]; then
if [[ -t 0 ]]; then
error "$(gettext "%s does not exist.")" "$BUILDFILE"
exit 1
else
# PKGBUILD passed through a pipe
BUILDFILE=/dev/stdin
source_safe "$BUILDFILE"
fi
error "$(gettext "%s does not exist.")" "$BUILDFILE"
exit 1
else
if [[ $(<"$BUILDFILE") = *$'\r'* ]]; then
error "$(gettext "%s contains %s characters and cannot be sourced.")" "$BUILDFILE" "CRLF"