[Lunar-commits] r17190 - lunar/trunk/var/lib/lunar/functions
Auke Kok
sofar at lunar-linux.org
Sun Nov 6 07:15:24 UTC 2005
Author: sofar
Date: 2005-11-06 07:15:21 +0000 (Sun, 06 Nov 2005)
New Revision: 17190
Modified:
lunar/trunk/var/lib/lunar/functions/modules.lunar
Log:
Final modifications - prolly still not bugfree but it seems to work ;^).
Modified: lunar/trunk/var/lib/lunar/functions/modules.lunar
===================================================================
--- lunar/trunk/var/lib/lunar/functions/modules.lunar 2005-11-06 06:58:18 UTC (rev 17189)
+++ lunar/trunk/var/lib/lunar/functions/modules.lunar 2005-11-06 07:15:21 UTC (rev 17190)
@@ -302,24 +302,18 @@
fi
# check for osi license
- case LICENSE in
- gpl|gpl2|lgpl|gfdl|bsd|mpl|cc|apache|artistic|qpl)
+ case $LICENSE in
+ gpl|gpl2|lgpl|gfdl|bsd|mpl|cc|apache|artistic|qpl|osi)
IS_OSI=yes
;;
esac
- # default case: only accept osi licenses:
- if [ -z "${ACCEPTED_LICENSES}${REJECTED_LICESES}" ]; then
- verbose_msg "Assuming we only accept osi licenses, please adjust your license acceptance settings in the lunar menus".
- ACCEPTED_LICENSES=osi
- fi
-
# check if $MODULE's $LICENSE is accepted or not, works as follows:
# if ACCEPTED_LICENSES is set, LICENSE *must* be listed, else if
# REJECTED_LICESES is set, must _NOT_ be listed
# * accept "osi" will accept all osi licenses
# * accept "all" will accept anything
- if [ -n "$(echo $ACCEPTED_LICENSES)" ]; then
+ if [ -n "$ACCEPTED_LICENSES" ]; then
for L in $ACCEPTED_LICENSES; do
if [ "$L" == "osi" -a "$IS_OSI" == "yes" ] || [ "$L" == "all" ] || [ "$LICENSE" == "$L" ] ; then
# explicitly accepted license!
@@ -330,7 +324,7 @@
# it was not explicitly accepted
error_message "${MODULE_COLOR}$1${DEFAULT_COLOR}: ${PROBLEM_COLOR}License \"$LICENSE\" is not explicitly accepted${DEFAULT_COLOR}"
return 1
- elif [ -n $REJECTED_LICENSES ]; then
+ elif [ -n "$REJECTED_LICENSES" ]; then
for L in $REJECTED_LICENSES; do
if [ "$LICENSE" == "$L" ]; then
# explicitly rejected license!
@@ -341,6 +335,12 @@
# implicitly not rejected
debug_msg "module_license_accepted: \"$LICENSE\" is not rejected"
return 0
+ else ## if [ -z "${ACCEPTED_LICENSES}${REJECTED_LICESES}" ]; then
+ # so now we have a problem - the user didn't set their prefs
+ if [ "$IS_OSI" != "yes" ] ; then
+ error_message "${MODULE_COLOR}$1${DEFAULT_COLOR}: ${PROBLEM_COLOR}License \"$LICENSE\" cannot be accepted by default${DEFAULT_COLOR}"
+ return 1
+ fi
fi
}
More information about the Lunar-commits
mailing list