Skip to content
This repository has been archived by the owner on Aug 9, 2019. It is now read-only.

Commit

Permalink
yaourt -U: don't install dependencies if -d is used twice
Browse files Browse the repository at this point in the history
  • Loading branch information
larchunix committed Oct 2, 2016
1 parent 2ba7d51 commit 63239e4
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/yaourt.sh.in
Expand Up @@ -180,9 +180,15 @@ yaourt_sync() {
# Handle -U,--upgrade
yaourt_upgrade () {
[[ $ARGS ]] || pacman_cmd 2
local depends=( $(pkgquery -Qpif '%D' "${ARGS[@]}") )
[[ $depends == "-" ]] && depends=""
depends=( $(pacman_parse -T "${depends[@]}") )

# Handle package(s) dependencies only if -d is specified less than
# twice on the command line
if ((DEPENDS < 2)); then
local depends=( $(pkgquery -Qpif '%D' "${ARGS[@]}") )
[[ $depends == "-" ]] && depends=""
depends=( $(pacman_parse -T "${depends[@]}") )
fi

if [[ $depends ]]; then
load_lib abs aur
SP_ARG="--asdeps" sync_packages "${depends[@]}"
Expand Down

0 comments on commit 63239e4

Please sign in to comment.