Skip to content

Commit

Permalink
Don't list optional depends in find_depends.
Browse files Browse the repository at this point in the history
If find_depends list optional depends. In zlocal an optional depend can
be interpreted as a hard depend.
  • Loading branch information
cavalier38 committed Jul 11, 2012
1 parent df7186c commit 9a7b574
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions libs/depends.lunar
Expand Up @@ -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 ($@)"
Expand All @@ -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:
Expand All @@ -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
Expand Down

0 comments on commit 9a7b574

Please sign in to comment.