makepkg: fix quoting in calls to dependency checking
This commit is contained in:
parent
90f1dd1657
commit
0b30edacd4
1 changed files with 4 additions and 4 deletions
|
@ -243,7 +243,7 @@ handle_deps() {
|
||||||
|
|
||||||
(( $# == 0 )) && return $R_DEPS_SATISFIED
|
(( $# == 0 )) && return $R_DEPS_SATISFIED
|
||||||
|
|
||||||
local deplist="$*"
|
local deplist=("$@")
|
||||||
|
|
||||||
if (( ! DEP_BIN )); then
|
if (( ! DEP_BIN )); then
|
||||||
return $R_DEPS_MISSING
|
return $R_DEPS_MISSING
|
||||||
|
@ -253,7 +253,7 @@ handle_deps() {
|
||||||
# install missing deps from binary packages (using pacman -S)
|
# install missing deps from binary packages (using pacman -S)
|
||||||
msg "$(gettext "Installing missing dependencies...")"
|
msg "$(gettext "Installing missing dependencies...")"
|
||||||
|
|
||||||
if ! run_pacman -S --asdeps $deplist; then
|
if ! run_pacman -S --asdeps "${deplist[@]}"; then
|
||||||
error "$(gettext "'%s' failed to install missing dependencies.")" "$PACMAN"
|
error "$(gettext "'%s' failed to install missing dependencies.")" "$PACMAN"
|
||||||
exit 1 # TODO: error code
|
exit 1 # TODO: error code
|
||||||
fi
|
fi
|
||||||
|
@ -276,10 +276,10 @@ resolve_deps() {
|
||||||
# deplist cannot be declared like this: local deplist=$(foo)
|
# deplist cannot be declared like this: local deplist=$(foo)
|
||||||
# Otherwise, the return value will depend on the assignment.
|
# Otherwise, the return value will depend on the assignment.
|
||||||
local deplist
|
local deplist
|
||||||
deplist=$(check_deps "$@") || exit 1
|
deplist=($(check_deps "$@")) || exit 1
|
||||||
[[ -z $deplist ]] && return $R_DEPS_SATISFIED
|
[[ -z $deplist ]] && return $R_DEPS_SATISFIED
|
||||||
|
|
||||||
if handle_deps $deplist; then
|
if handle_deps "${deplist[@]}"; then
|
||||||
# check deps again to make sure they were resolved
|
# check deps again to make sure they were resolved
|
||||||
deplist=$(check_deps "$@") || exit 1
|
deplist=$(check_deps "$@") || exit 1
|
||||||
[[ -z $deplist ]] && return $R_DEPS_SATISFIED
|
[[ -z $deplist ]] && return $R_DEPS_SATISFIED
|
||||||
|
|
Loading…
Add table
Reference in a new issue