Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/scripts/makepkg.sh.in
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/makepkg.sh.in')
-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