aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEinhard Leichtfuß <alguien@respiranto.de>2017-10-23 09:07:11 +0200
committerEinhard Leichtfuß <alguien@respiranto.de>2017-10-23 09:07:11 +0200
commit5bc80ccb6f99d4e001a6bb4c6fbd23843fd41a91 (patch)
treef3e23980f760cf2c46888e36f4751728c8e77fea
parentb386641da32a66f8452569337ad0abdb190452a5 (diff)
Initialize aur_pkgorder.
-rwxr-xr-xauria.sh20
1 files changed, 13 insertions, 7 deletions
diff --git a/auria.sh b/auria.sh
index dac230b..d6b7a7e 100755
--- a/auria.sh
+++ b/auria.sh
@@ -318,6 +318,7 @@ function get_pkgbase
return 2
elif [[ $rcount -gt 1 ]]
then
+ # Should never happen.
inform "Several package bases match:"
i=0
while [[ $i -lt $rcount ]]
@@ -481,13 +482,18 @@ function resolve_deps
aur_deps["$pkg"]="$(printf " %s " "${deps[@]}" "${makedeps[@]}")"
- local dep
- for dep in "${deps[@]}" "${makedeps[@]}"
- do
- #echo $dep
- aur_revdeps["$dep"]="$pkg"
- resolve_deps "$dep" dep
- done
+ if [ ${#dep} -eq 0 ]
+ then
+ aur_pkgorder+=("$pkg")
+ else
+ local dep
+ for dep in "${deps[@]}" "${makedeps[@]}"
+ do
+ #echo $dep
+ aur_revdeps["$dep"]="$pkg"
+ resolve_deps "$dep" dep
+ done
+ fi
fi
}