* check_deps is being run in a subshell, so exit 1 has no meaning. * Its return value was also being ignored by the enclosing funcion. * Local assignments *always* take precedence over subshell's $? Fixes FS#19840 Although this really ignored *all* errors from pacman except 127, not just illegal directives in pacman.conf. Signed-off-by: Andres P <aepd87@gmail.com> --- Let's not go crazy with them subshells. $ fn() { foo=$(false); echo $?; local bar=$(false); echo $?; } $ fn 1 0 scripts/makepkg.sh.in | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index b0215c8..41e6978 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -434,14 +434,15 @@ resolve_deps() { local R_DEPS_SATISFIED=0 local R_DEPS_MISSING=1 - local deplist="$(check_deps $*)" + local deplist + deplist="$(check_deps $*)" || return if [[ -z $deplist ]]; then return $R_DEPS_SATISFIED fi if handle_deps $deplist; then # check deps again to make sure they were resolved - deplist="$(check_deps $*)" + deplist="$(check_deps $*)" || return [[ -z $deplist ]] && return $R_DEPS_SATISFIED elif (( DEP_BIN )); then error "$(gettext "Failed to install all missing dependencies.")" -- 1.7.1