[Lunar-commits] <lunar> Don't list optional depends in find_depends.

Peter de Ridder peter at lunar-linux.org
Thu Jul 12 00:01:37 CEST 2012


commit 9a7b57401d993fe400da234cb9d03790b91407aa
Author: Peter de Ridder <peter at lunar-linux.org>
Date: Wed, 11 Jul 2012 15:01:37 -0700
URL: https://github.com/lunar-linux/lunar/commit/9a7b57401d993fe400da234cb9d03790b91407aa

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                                           +2/-4     
  1 files changed, 2 insertions (+), 4 deletions (-)

--- 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




More information about the Lunar-commits mailing list