Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2012-01-31 23:25:19 +1000
committerDan McGee <dan@archlinux.org>2012-01-31 11:22:50 -0600
commit47313acee48029bfdd1ee34bf1947b962ccff283 (patch)
tree31f96ddae3d81d90e7661b861599293bace7f3bf
parentfcbae69fe81d080478bbd9809af5696bbbfe9d95 (diff)
makepkg: Fix non-writable SRCPKGDEST error message
Provide a helpful error message for when creating a source tarball and SRCPKGDEST is not writable. Fixes FS#28197. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r--scripts/makepkg.sh.in5
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index e51f9ede..f407e67b 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -2048,6 +2048,11 @@ fi
SRCPKGDEST=${_SRCPKGDEST:-$SRCPKGDEST}
SRCPKGDEST=${SRCPKGDEST:-$startdir} #default to $startdir if undefined
+if (( SOURCEONLY )) && [[ ! -w $SRCPKGDEST ]]; then
+ error "$(gettext "You do not have write permission to store source tarballs in %s.")" "$SRCPKGDEST"
+ plain "$(gettext "Aborting...")"
+ exit 1
+fi
PKGEXT=${_PKGEXT:-$PKGEXT}
SRCEXT=${_SRCEXT:-$SRCEXT}