optional_depends bug ....
Joel Vennin (linuxgames)
jol at linuxgames.com
Fri May 16 21:12:57 GMT 2003
Hello, I think the bug is here :
In the optional_depends function of the run_depends function.
Just an example with doxygen.
Doxygen has Textex as optional depend.
In my system Textex is not installed.
let's comment ....
if ! in_depends "$MODULE" "$1" ; then
if module_exiled $1 ; then ## Tetex is not exiled
verbose_msg "\"$MODULE\" optionally depends on \"$1\""
add_depends "$MODULE" "$1" "off" "optional" "$2" "$3"
else
if module_installed $1 || module_held $1 ; then ## Tetex is not
insalled and no held ...
DEFAULT="y"
else
DEFAULT="n"
fi
if is_depends $1 ; then <--- Problem is here
if query "Install optional dependency $1 $4? " $DEFAULT ; then <-- never
here !!!!
lin --deps $1
add_depends "$MODULE" "$1" "on" "optional" "$2" "$3"
else
add_depends "$MODULE" "$1" "off" "optional" "$2" "$3"
fi
fi
fi
Let's explain, is_depend try to find Tetex in the depends files, but Tetex is
not installed on my machine, so is_depend return false. And if is_depend
return false "" if query "Install optional dependency $1 $4? " $DEFAULT ; ""
is never called.
Just see is_depend ()
is_depends() { (
# Is $1 a previously selected dependency of any module.
EXIT_STATUS="false"
for DEP in `cut -d : -f2- $DEPENDS_STATUS |
grep "^$1:"` <<<----- As i haven't Tetex installed
this command return nothing and this function return false.
do
DEP_STATUS=`echo "$DEP" | cut -d : -f2`
if [ "$DEP_STATUS" == "on" ]
then EXIT_STATUS="true"
break
fi
done
$EXIT_STATUS
) }
So, Some one can explain why there is the "if is_depends $1 " condition ?
Thanks,
Jol
More information about the Lunar-dev
mailing list