Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   ArchLinux Pacman Development (http://www.linux-archive.org/archlinux-pacman-development/)
-   -   makepkg: Fix non-writable SRCPKGDEST error message (http://www.linux-archive.org/archlinux-pacman-development/627260-makepkg-fix-non-writable-srcpkgdest-error-message.html)

Allan McRae 01-31-2012 12:28 PM

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>
---
scripts/makepkg.sh.in | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index e51f9ed..f407e67 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}
--
1.7.9


All times are GMT. The time now is 04:23 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.