From 9a7b57401d993fe400da234cb9d03790b91407aa Mon Sep 17 00:00:00 2001 From: Peter de Ridder Date: Thu, 12 Jul 2012 00:01:37 +0200 Subject: [PATCH] Don't list optional depends in find_depends. If find_depends list optional depends. In zlocal an optional depend can be interpreted as a hard depend. --- libs/depends.lunar | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/libs/depends.lunar b/libs/depends.lunar index d4bab7c71..07e2213aa 100644 --- a/libs/depends.lunar +++ b/libs/depends.lunar @@ -24,6 +24,7 @@ # function : find_depends # usage : find_depends "module name" # purpose : recursive dependency finder, no need to be installed +# NOTE: this only finds required dependencies! function find_depends() { local TMP_FDEPS debug_msg "find_depends ($@)" @@ -43,7 +44,7 @@ function find_depends() { optional_depends() { # No quotes, this prevent us from parsing newlines # if someone by accident add a newline in optional_depends - echo $1 + : } # yeah, this sucks: @@ -66,9 +67,6 @@ function find_depends() { if grep -q "^$1:$DEP:required:" "$DEPENDS_CACHE" ; then echo "$DEP" find_depends_intern "$DEP" - elif module_installed "$DEP" ; then - echo "$DEP" - find_depends_intern "$DEP" fi fi done