From 728965343e0069c34d69e530d2a1e6c2823b1921 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Fri, 13 Sep 2019 21:30:16 +0300 Subject: [PATCH] kiss: handle dependencies 'smarter' --- kiss | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/kiss b/kiss index abb553c..30fe95b 100755 --- a/kiss +++ b/kiss @@ -350,6 +350,9 @@ pkg_build() { log "Resolving dependencies" for pkg; do pkg_depends "$pkg" explicit; done + # If an explicit package is a dependency of another explicit + # package, remove it from the explicit list as it needs to be + # installed as a dependency. for pkg; do case $deps in *" $pkg "*) explicit=$(echo "$explicit" | sed "s/ $pkg / /g") @@ -364,7 +367,7 @@ pkg_build() { # are included and ensure that all installed packages are excluded. for pkg; do case $explicit_build in - *" $pkg "*|-) ;; + *" $pkg "*) ;; *) pkg_list "$pkg" >/dev/null && continue ;; esac