index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | William Giokas <1007380@gmail.com> | 2012-11-29 01:08:55 -0600 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2012-12-14 12:35:34 +1000 |
commit | 0c74ffd6b6e8f96d388c1e8219902beb369bf1b8 (patch) | |
tree | acb80c0b0dd15429d49e700e9dc45764e130b95c /scripts/makepkg.sh.in | |
parent | 964640fbfcde48b7937a6c18964c78a3b11db3de (diff) |
-rw-r--r-- | scripts/makepkg.sh.in | 11 |
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 274aded2..e4e76cd1 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -1362,7 +1362,7 @@ run_function() { local ret=0 if (( LOGGING )); then local fullver=$(get_full_version) - local BUILDLOG="${startdir}/${pkgbase}-${fullver}-${CARCH}-$pkgfunc.log" + local BUILDLOG="$LOGDEST/${pkgbase}-${fullver}-${CARCH}-$pkgfunc.log" if [[ -f $BUILDLOG ]]; then local i=1 while true; do @@ -2531,6 +2531,7 @@ trap 'trap_exit USR1 "$(gettext "An unknown error has occurred. Exiting...")"' E [[ -n ${PKGDEST} ]] && _PKGDEST=$(canonicalize_path ${PKGDEST}) [[ -n ${SRCDEST} ]] && _SRCDEST=$(canonicalize_path ${SRCDEST}) [[ -n ${SRCPKGDEST} ]] && _SRCPKGDEST=$(canonicalize_path ${SRCPKGDEST}) +[[ -n ${LOGDEST} ]] && _LOGDEST=$(canonicalize_path ${LOGDEST}) [[ -n ${BUILDDIR} ]] && _BUILDDIR=$(canonicalize_path ${BUILDDIR}) [[ -n ${PKGEXT} ]] && _PKGEXT=${PKGEXT} [[ -n ${SRCEXT} ]] && _SRCEXT=${SRCEXT} @@ -2623,6 +2624,14 @@ if (( SOURCEONLY )) && [[ ! -w $SRCPKGDEST ]]; then exit 1 fi +LOGDEST=${_LOGDEST:-$LOGDEST} +LOGDEST=${LOGDEST:-$startdir} #default to $startdir if undefined +if (( LOGGING )) && [[ ! -w $LOGDEST ]]; then + error "$(gettext "You do not have write permission to store logs in %s.")" "$LOGDEST" + plain "$(gettext "Aborting...")" + exit 1 +fi + PKGEXT=${_PKGEXT:-$PKGEXT} SRCEXT=${_SRCEXT:-$SRCEXT} GPGKEY=${_GPGKEY:-$GPGKEY} |