summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2012-02-06 12:50:48 +0100
committerDan McGee <dan@archlinux.org>2012-02-06 12:50:48 +0100
commitf55be4897799c5a6dcb454455ad9edcfc36f8495 (patch)
treedd87b34de4b85f307d5dd05f6d576aadc3ad3697 /scripts
parentb488f229d2ec4f2e4b9e746d68422460ca664715 (diff)
parentb7c06d6d678ebe6a434b2387c3bda14647113f32 (diff)
downloadpacman-f55be4897799c5a6dcb454455ad9edcfc36f8495.tar.gz
pacman-f55be4897799c5a6dcb454455ad9edcfc36f8495.tar.xz
Merge branch 'maint'
Conflicts: lib/libalpm/alpm_list.c
Diffstat (limited to 'scripts')
-rw-r--r--scripts/makepkg.sh.in15
1 files changed, 12 insertions, 3 deletions
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 82742554..ba96e843 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -519,7 +519,7 @@ remove_deps() {
local deplist
deplist=($(grep -xvFf <(printf "%s\n" "${original_pkglist[@]}") \
<(printf "%s\n" "${current_pkglist[@]}") || true))
- if [[ -n deplist ]]; then
+ if [[ -z deplist ]]; then
return
fi
@@ -1838,7 +1838,7 @@ usage() {
echo
printf -- "$(gettext "Usage: %s [options]")\n" "$0"
echo
- printf -- "$(gettext "Options:")"
+ printf -- "$(gettext "Options:")\n"
printf -- "$(gettext " -A, --ignorearch Ignore incomplete %s field in %s")\n" "arch" "$BUILDSCRIPT"
printf -- "$(gettext " -c, --clean Clean up work files after build")\n"
printf -- "$(gettext " -d, --nodeps Skip all dependency checks")\n"
@@ -2058,6 +2058,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}
@@ -2305,7 +2310,7 @@ if (( NODEPS || ( (NOBUILD || REPKG) && !DEP_BIN ) )); then
warning "$(gettext "Skipping dependency checks.")"
fi
elif type -p "${PACMAN%% *}" >/dev/null; then
- if (( RMDEPS )); then
+ if (( RMDEPS && ! INSTALL )); then
original_pkglist=($(run_pacman -Qq)) # required by remove_dep
fi
deperr=0
@@ -2313,6 +2318,10 @@ elif type -p "${PACMAN%% *}" >/dev/null; then
msg "$(gettext "Checking runtime dependencies...")"
resolve_deps ${depends[@]} || deperr=1
+ if (( RMDEPS && INSTALL )); then
+ original_pkglist=($(run_pacman -Qq)) # required by remove_dep
+ fi
+
msg "$(gettext "Checking buildtime dependencies...")"
resolve_deps ${makedepends[@]} || deperr=1