1
0
mirror of https://codeberg.org/kiss-community/kiss synced 2024-12-24 16:10:05 -07:00

kiss: move list check to inner loop

This commit is contained in:
Dylan Araps 2020-09-14 15:29:53 +03:00
parent 27e406bc84
commit e95fbda45c
No known key found for this signature in database
GPG Key ID: 46D62DD9F1DE636E

6
kiss
View File

@ -356,14 +356,16 @@ pkg_depends() {
# Resolve all dependencies and generate an ordered list. The deepest
# dependencies are listed first and then the parents in reverse order.
contains "$deps" "$1" || {
pkg_list "$1" >/dev/null 2>&1 && return 0
pkg_find "$1"
# Recurse through the dependencies of the child packages.
[ -f "$repo_dir/depends" ] && {
while read -r dep _ || [ "$dep" ]; do
case $dep in
[!\#]*) pkg_depends "$dep" ;;
[!\#]*)
pkg_list "$dep" >/dev/null 2>&1 ||
pkg_depends "$dep"
;;
esac
done < "$repo_dir/depends"
}