[pacman-dev] [RFC][PATCH] makepkg: remove sourcing PKGBUILD from stdin

Allan McRae allan at archlinux.org
Sat May 18 09:09:55 EDT 2013


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 at archlinux.org>
---

Any objections to this?

 scripts/makepkg.sh.in | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index b85b87e..c311c30 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -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"
-- 
1.8.2.3



More information about the pacman-dev mailing list