1
0
mirror of https://codeberg.org/kiss-community/kiss synced 2024-12-23 07:30:16 -07:00

pkg_depends: use if

This commit is contained in:
Dylan Araps 2021-07-06 19:23:02 +03:00
parent 47e870e375
commit 2d913c45a8
No known key found for this signature in database
GPG Key ID: 13295DAC2CF13B5C

4
kiss
View File

@ -410,7 +410,9 @@ pkg_depends() {
# dependencies are listed first and then the parents in reverse order.
contains "$deps" "$1" || {
# Filter out non-explicit, aleady installed dependencies.
[ "$3" ] && [ -z "$2" ] && pkg_list "$1" >/dev/null 2>&1 && return
if [ "$3" ] && [ -z "$2" ] && pkg_list "$1" >/dev/null 2>&1; then
return
fi
# Detect circular dependencies and bail out.
# Looks for multiple repeating patterns of (dep dep_parent) (5 is max).