[Lunar-commits] r19373 - in lunar/branches/stable: bin etc/lunar sbin usr/share/doc/lunar/core-documentation var/lib/lunar var/lib/lunar/compilers var/lib/lunar/functions var/lib/lunar/menu var/lib/lunar/plugins

Auke Kok sofar at lunar-linux.org
Wed Mar 22 01:54:51 UTC 2006


Author: sofar
Date: 2006-03-22 01:54:48 +0000 (Wed, 22 Mar 2006)
New Revision: 19373

Modified:
   lunar/branches/stable/bin/lvu
   lunar/branches/stable/etc/lunar/config
   lunar/branches/stable/sbin/lunar
   lunar/branches/stable/usr/share/doc/lunar/core-documentation/etc_lunar_config.html
   lunar/branches/stable/var/lib/lunar/compilers/c++
   lunar/branches/stable/var/lib/lunar/compilers/cc
   lunar/branches/stable/var/lib/lunar/compilers/g++
   lunar/branches/stable/var/lib/lunar/compilers/gcc
   lunar/branches/stable/var/lib/lunar/compilers/ld
   lunar/branches/stable/var/lib/lunar/compilers/make
   lunar/branches/stable/var/lib/lunar/functions/build.lunar
   lunar/branches/stable/var/lib/lunar/functions/check.lunar
   lunar/branches/stable/var/lib/lunar/functions/depends.lunar
   lunar/branches/stable/var/lib/lunar/functions/download.lunar
   lunar/branches/stable/var/lib/lunar/functions/init.lunar
   lunar/branches/stable/var/lib/lunar/functions/main.lunar
   lunar/branches/stable/var/lib/lunar/functions/messages.lunar
   lunar/branches/stable/var/lib/lunar/functions/misc.lunar
   lunar/branches/stable/var/lib/lunar/functions/modules.lunar
   lunar/branches/stable/var/lib/lunar/functions/optimize.lunar
   lunar/branches/stable/var/lib/lunar/functions/plugins.lunar
   lunar/branches/stable/var/lib/lunar/functions/sources.lunar
   lunar/branches/stable/var/lib/lunar/functions/updatelog.lunar
   lunar/branches/stable/var/lib/lunar/menu/dmodule.menu
   lunar/branches/stable/var/lib/lunar/menu/download.menu
   lunar/branches/stable/var/lib/lunar/plugins/download-generic.plugin
   lunar/branches/stable/var/lib/lunar/unset.sh
Log:
Backport of all outstanding changes in theedge:
- new wrappers
- new optimization plugins (you need to run lunar optimize!)
- has_module_file generic code
- GCCWRAPPERS obsoleted
- remove := in favour of :- bash default assignment


Modified: lunar/branches/stable/bin/lvu
===================================================================
--- lunar/branches/stable/bin/lvu	2006-03-21 22:49:23 UTC (rev 19372)
+++ lunar/branches/stable/bin/lvu	2006-03-22 01:54:48 UTC (rev 19373)
@@ -376,7 +376,7 @@
     follow_active_lin $MODULE
   done
 
-  DEFAULT_DELAY=${DEFAULT_DELAY:=60}
+  DEFAULT_DELAY=${DEFAULT_DELAY:-60}
 
   while true ; do
     if ! ACTIVE_MODULE=$(find_active_lin) ; then

Modified: lunar/branches/stable/etc/lunar/config
===================================================================
--- lunar/branches/stable/etc/lunar/config	2006-03-21 22:49:23 UTC (rev 19372)
+++ lunar/branches/stable/etc/lunar/config	2006-03-22 01:54:48 UTC (rev 19373)
@@ -42,33 +42,32 @@
           MODULE_INDEX=/var/state/lunar/module.index
 
          INSTALL_CACHE=/var/cache/lunar
-          SOURCE_CACHE=${SOURCE_CACHE:=/var/spool/lunar}
+          SOURCE_CACHE=${SOURCE_CACHE:-/var/spool/lunar}
 
 #  Override the following variables in /etc/lunar/local/config
 #  Or by exporting them before installing or removing.
 
-              ARCHIVE=${ARCHIVE:=on}
-              AUTOFIX=${AUTOFIX:=on}
-            AUTOPRUNE=${AUTOPRUNE:=on}
-         MAIL_REPORTS=${MAIL_REPORTS:=off}
-             PRESERVE=${PRESERVE:=on}
-                 REAP=${REAP:=on}
-                ADMIN=${ADMIN:=root}
-                SOUND=${SOUND:=off}
-              SUSTAIN=${SUSTAIN:=on}
-         VIEW_REPORTS=${VIEW_REPORTS:=off}
-               VOYEUR=${VOYEUR:=on}
-              GARBAGE=${GARBAGE:=on}
-         PROMPT_DELAY=${PROMPT_DELAY:=150}
-          GCCWRAPPERS=${GCCWRAPPERS:=on}
-        PROBE_EXPIRED=${PROBE_EXPIRED:=on}
-                TMPFS=${TMPFS:=off}
+              ARCHIVE=${ARCHIVE:-on}
+              AUTOFIX=${AUTOFIX:-on}
+            AUTOPRUNE=${AUTOPRUNE:-on}
+         MAIL_REPORTS=${MAIL_REPORTS:-off}
+             PRESERVE=${PRESERVE:-on}
+                 REAP=${REAP:-on}
+                ADMIN=${ADMIN:-root}
+                SOUND=${SOUND:-off}
+              SUSTAIN=${SUSTAIN:-on}
+         VIEW_REPORTS=${VIEW_REPORTS:-off}
+               VOYEUR=${VOYEUR:-on}
+              GARBAGE=${GARBAGE:-on}
+         PROMPT_DELAY=${PROMPT_DELAY:-150}
+        PROBE_EXPIRED=${PROBE_EXPIRED:-on}
+                TMPFS=${TMPFS:-off}
        LUNAR_PRIORITY="+10"
 
-            LDD_CHECK=${LDD_CHECK:=on}
-           FIND_CHECK=${FIND_CHECK:=on}
-         MD5SUM_CHECK=${MD5SUM_CHECK:=on}
-            SYM_CHECK=${SYM_CHECK:=off}
+            LDD_CHECK=${LDD_CHECK:-on}
+           FIND_CHECK=${FIND_CHECK:-on}
+         MD5SUM_CHECK=${MD5SUM_CHECK:-on}
+            SYM_CHECK=${SYM_CHECK:-off}
 
               GNU_URL=ftp://ftp.gnu.org/pub/gnu
               KDE_URL=ftp://ftp.kde.org/pub/kde
@@ -85,7 +84,7 @@
 	    
               TRACKED="/bin /boot /etc /lib /sbin /usr /var /opt/lunar"
 
-               TMPDIR=${TMPDIR:=/tmp}
+               TMPDIR=${TMPDIR:-/tmp}
 
               DEFAULT="\e[0m"
                  BOLD="\e[1m"

Modified: lunar/branches/stable/sbin/lunar
===================================================================
--- lunar/branches/stable/sbin/lunar	2006-03-21 22:49:23 UTC (rev 19372)
+++ lunar/branches/stable/sbin/lunar	2006-03-22 01:54:48 UTC (rev 19373)
@@ -511,20 +511,20 @@
   X_HELP="When using --probe, also recompile modules if a newer version is available?"
   Z_HELP="Custom modules in zlocal override equally named ones (NOT RECOMMENDED) ?"
 
-         ARCHIVE=${ARCHIVE:=on}
-   AUTORESURRECT=${AUTORESURRECT:=on}
-         AUTOFIX=${AUTOFIX:=on}
-       AUTOPRUNE=${AUTOPRUNE:=off}
-           COLOR=${COLOR:=on}
-     KEEP_SOURCE=${KEEP_SOURCE:=off}      
-    MAIL_REPORTS=${MAIL_REPORTS:=off}
-    VIEW_REPORTS=${VIEW_REPORTS:=off}
-        PRESERVE=${PRESERVE:=on}
-           SOUND=${SOUND:=off}
+         ARCHIVE=${ARCHIVE:-on}
+   AUTORESURRECT=${AUTORESURRECT:-on}
+         AUTOFIX=${AUTOFIX:-on}
+       AUTOPRUNE=${AUTOPRUNE:-off}
+           COLOR=${COLOR:-on}
+     KEEP_SOURCE=${KEEP_SOURCE:-off}      
+    MAIL_REPORTS=${MAIL_REPORTS:-off}
+    VIEW_REPORTS=${VIEW_REPORTS:-off}
+        PRESERVE=${PRESERVE:-on}
+           SOUND=${SOUND:-off}
          SUSTAIN=${SUSTAIN:on}
-          VOYEUR=${VOYEUR:=on}
-            REAP=${REAP:=on}
-         GARBAGE=${GARBAGE:=on}
+          VOYEUR=${VOYEUR:-on}
+            REAP=${REAP:-on}
+         GARBAGE=${GARBAGE:-on}
 	 VERBOSE=${VERBOSE:off}
 
         if [ -z $TMPFS ]; then
@@ -663,7 +663,7 @@
       F)  feature_menu           ;;
       I)  integrity_menu         ;;
       M)  mirror_menu            ;;
-      O)  . /var/lib/lunar/menu/optimize.menu && optimize_menu          ;;
+      O)  optimize_menu          ;;
       L)  set_default_module     ;;
       A)  set_accepted_licenses  ;;
       R)  set_rejected_licenses  ;;
@@ -789,7 +789,7 @@
 
   export IFS="$TAB_ENTER_IFS"
 
-  LUNAR_MODULE=${LUNAR_MODULE:=lunar}
+  LUNAR_MODULE=${LUNAR_MODULE:-lunar}
   LUNAR_VERSION=$(run_details $LUNAR_MODULE && echo $UPDATED)
 
   main_menu
@@ -823,7 +823,7 @@
     renew      ) renew                                  ;;
     update     ) update                                 ;;
     rebuild    ) rebuild                                ;;
-    optimize   ) . /var/lib/lunar/menu/optimize.menu && optimize_menu  ;;
+    optimize   ) optimize_menu				;;
     set        ) shift && setvar $@                     ;;
     unset      ) shift && unsetvar $@                   ;;
     fix        ) shift && run_fix $@                    ;;

Modified: lunar/branches/stable/usr/share/doc/lunar/core-documentation/etc_lunar_config.html
===================================================================
--- lunar/branches/stable/usr/share/doc/lunar/core-documentation/etc_lunar_config.html	2006-03-21 22:49:23 UTC (rev 19372)
+++ lunar/branches/stable/usr/share/doc/lunar/core-documentation/etc_lunar_config.html	2006-03-22 01:54:48 UTC (rev 19373)
@@ -300,7 +300,6 @@
 VOYEUR=${VOYEUR:=on}<br>
 GARBAGE=${GARBAGE:=on}<br>
 PROMPT_DELAY=${PROMPT_DELAY:=150}<br>
-GCCWRAPPERS=${GCCWRAPPERS:=on}<br>
 LUNAR_PRIORITY="+10"<br>
 MAX_SOURCES=100<br>
 LDD_CHECK=${LDD_CHECK:=on}<br>

Modified: lunar/branches/stable/var/lib/lunar/compilers/c++
===================================================================
--- lunar/branches/stable/var/lib/lunar/compilers/c++	2006-03-21 22:49:23 UTC (rev 19372)
+++ lunar/branches/stable/var/lib/lunar/compilers/c++	2006-03-22 01:54:48 UTC (rev 19373)
@@ -1,8 +1,10 @@
 #!/bin/bash
 
-if [ -n "$LUNAR_DEBUG" ] ; then
-  echo "++ $CXX_EXT ${COMPILER_PATH:-/usr/bin}/g++ $CCOPT \"$@\"" >&2
+PROG=$(PATH=${PATH//\/var\/lib\/lunar\/compilers/} type -p ${0##*/})
+
+if [[ -n "$LUNAR_DEBUG" ]] ; then
+	echo "++ $CXX_EXT $PROG $CCOPT $CXXFLAGS $@" >&2
 fi
 
-$CXX_EXT ${COMPILER_PATH:-/usr/bin}/g++ $CCOPT "$@"
+exec $CXX_EXT $PROG $CCOPT $CXXFLAGS "$@"
 

Modified: lunar/branches/stable/var/lib/lunar/compilers/cc
===================================================================
--- lunar/branches/stable/var/lib/lunar/compilers/cc	2006-03-21 22:49:23 UTC (rev 19372)
+++ lunar/branches/stable/var/lib/lunar/compilers/cc	2006-03-22 01:54:48 UTC (rev 19373)
@@ -1,8 +1,10 @@
 #!/bin/bash
 
-if [ -n "$LUNAR_DEBUG" ] ; then
-  echo "++ $CC_EXT ${COMPILER_PATH:-/usr/bin}/gcc $COPT \"$@\"" >&2
+PROG=$(PATH=${PATH//\/var\/lib\/lunar\/compilers/} type -p ${0##*/})
+
+if [[ -n "$LUNAR_DEBUG" ]] ; then
+	echo "++ $CC_EXT $PROG $COPT $CFLAGS $@" >&2
 fi
  
-$CC_EXT ${COMPILER_PATH:-/usr/bin}/gcc $COPT "$@"
+exec $CC_EXT $PROG $COPT $CFLAGS "$@"
 

Modified: lunar/branches/stable/var/lib/lunar/compilers/g++
===================================================================
--- lunar/branches/stable/var/lib/lunar/compilers/g++	2006-03-21 22:49:23 UTC (rev 19372)
+++ lunar/branches/stable/var/lib/lunar/compilers/g++	2006-03-22 01:54:48 UTC (rev 19373)
@@ -1,8 +1,10 @@
 #!/bin/bash
 
-if [ -n "$LUNAR_DEBUG" ] ; then
-  echo "++ $CXX_EXT ${COMPILER_PATH:-/usr/bin}/g++ $CCOPT \"$@\"" >&2
+PROG=$(PATH=${PATH//\/var\/lib\/lunar\/compilers/} type -p ${0##*/})
+
+if [[ -n "$LUNAR_DEBUG" ]] ; then
+	echo "++ $CXX_EXT $PROG $CCOPT $CXXFLAGS $@" >&2
 fi
  
-$CXX_EXT ${COMPILER_PATH:-/usr/bin}/g++ $CCOPT "$@"
+exec $CXX_EXT $PROG $CCOPT $CXXFLAGS "$@"
 

Modified: lunar/branches/stable/var/lib/lunar/compilers/gcc
===================================================================
--- lunar/branches/stable/var/lib/lunar/compilers/gcc	2006-03-21 22:49:23 UTC (rev 19372)
+++ lunar/branches/stable/var/lib/lunar/compilers/gcc	2006-03-22 01:54:48 UTC (rev 19373)
@@ -1,8 +1,10 @@
 #!/bin/bash
 
-if [ -n "$LUNAR_DEBUG" ] ; then
-  echo "++ $CC_EXT ${COMPILER_PATH:-/usr/bin}/gcc $COPT \"$@\"" >&2
+PROG=$(PATH=${PATH//\/var\/lib\/lunar\/compilers/} type -p ${0##*/})
+
+if [[ -n "$LUNAR_DEBUG" ]] ; then
+	echo "++ $CC_EXT $PROG $COPT $CFLAGS $@" >&2
 fi
  
-$CC_EXT ${COMPILER_PATH:-/usr/bin}/gcc $COPT "$@"
+exec $CC_EXT $PROG $COPT $CFLAGS "$@"
 

Modified: lunar/branches/stable/var/lib/lunar/compilers/ld
===================================================================
--- lunar/branches/stable/var/lib/lunar/compilers/ld	2006-03-21 22:49:23 UTC (rev 19372)
+++ lunar/branches/stable/var/lib/lunar/compilers/ld	2006-03-22 01:54:48 UTC (rev 19373)
@@ -1,8 +1,10 @@
 #!/bin/bash
 
-if [ -n "$LUNAR_DEBUG" ] ; then
-  echo "++ ${LD_PATH:-/usr/bin}/ld \"$@\"" >&2
+PROG=$(PATH=${PATH//\/var\/lib\/lunar\/compilers/} type -p ${0##*/})
+
+if [[ -n "$LUNAR_DEBUG" ]] ; then
+        echo "++ $PROG $@" >&2
 fi
 
-${LD_PATH:-/usr/bin}/ld "$@"
+exec $PROG "$@"
 

Modified: lunar/branches/stable/var/lib/lunar/compilers/make
===================================================================
--- lunar/branches/stable/var/lib/lunar/compilers/make	2006-03-21 22:49:23 UTC (rev 19372)
+++ lunar/branches/stable/var/lib/lunar/compilers/make	2006-03-22 01:54:48 UTC (rev 19373)
@@ -1,8 +1,10 @@
 #!/bin/bash
 
-if [ -n "$LUNAR_DEBUG" ] ; then
-  echo "++ $MAKE_EXT ${MAKE_PATH:-/usr/bin}/make ${MAKES:+-j$MAKES} \"$@\"" >&2
+PROG=$(PATH=${PATH//\/var\/lib\/lunar\/compilers/} type -p ${0##*/})
+
+if [[ -n "$LUNAR_DEBUG" ]] ; then
+	echo "++ $MAKE_EXT $PROG ${MAKES:+-j$MAKES} $@" >&2
 fi
 
-$MAKE_EXT ${MAKE_PATH:-/usr/bin}/make ${MAKES:+-j$MAKES} "$@"
+exec $MAKE_EXT $PROG ${MAKES:+-j$MAKES} "$@"
 

Modified: lunar/branches/stable/var/lib/lunar/functions/build.lunar
===================================================================
--- lunar/branches/stable/var/lib/lunar/functions/build.lunar	2006-03-21 22:49:23 UTC (rev 19372)
+++ lunar/branches/stable/var/lib/lunar/functions/build.lunar	2006-03-22 01:54:48 UTC (rev 19373)
@@ -152,8 +152,6 @@
 {
   debug_msg "_configure($@)"
   if [ -e ./configure ]; then
-    verbose_msg "CFLAGS=\"$CFLAGS\""
-	verbose_msg "LDFLAGS=\"$LDFLAGS\""
     verbose_msg "./configure $@"
     ./configure $@
   elif [ -e Makefile -o -e makefile ]; then
@@ -196,8 +194,6 @@
 default_cvs_config() {
   debug_msg "default_cvs_config ($@)"
   verbose_msg "running \"default_cvs_config\""
-  verbose_msg "CFLAGS=\"$CFLAGS\""
-  verbose_msg "LDFLAGS=\"$LDFLAGS\""
   verbose_msg "MODULE_PREFIX=\"$MODULE_PREFIX\""
 
   ./autogen.sh  --build=$BUILD                      \
@@ -335,19 +331,21 @@
     set_module_config OPTS "$OPTS"
   fi
   plugin_call BUILD_CONFIGURE $MODULE
-  run_module_file $MODULE CONFIGURE
+  if has_module_file $MODULE CONFIGURE ; then
+    run_module_file $MODULE CONFIGURE
+  fi
 }
 
 
 run_pre_build() {
   debug_msg "run_pre_build ($@)"
-  message "${MESSAGE_COLOR}Building ${MODULE_COLOR}$MODULE${DEFAULT_COLOR}"
+  message "${MESSAGE_COLOR}Building ${MODULE_COLOR}$MODULE${DEFAULT_COLOR}${MESSAGE_COLOR} version ${MODULE_COLOR}$VERSION${DEFAULT_COLOR}"
 
   cd $BUILD_DIRECTORY
 
   if verify_all_sources $MODULE ; then
     plugin_call BUILD_PRE_BUILD $MODULE
-    if [ -s $SCRIPT_DIRECTORY/PRE_BUILD ] ; then
+    if has_module_file $MODULE PRE_BUILD ; then
       run_module_file $MODULE PRE_BUILD
     else
       if ! default_pre_build ; then
@@ -362,14 +360,19 @@
 
 run_build()  {
   debug_msg "run_build ($@)"
-  if [ -d "$SOURCE_DIRECTORY" ] ; then
+  if [[ -d "$SOURCE_DIRECTORY" ]] ; then
     cd $SOURCE_DIRECTORY
   fi
 
   verbose_msg "building \"$MODULE\" version \"$VERSION\" in `pwd`"
   
+  # this calls optimizations and others:
   plugin_call BUILD_BUILD $MODULE
-  if [ -s $SCRIPT_DIRECTORY/BUILD ] ; then
+  # now override compile wrappers if needed:
+  if [[ "${USE_WRAPPERS:-yes}" == "yes" ]]; then
+    export PATH=/var/lib/lunar/compilers:$PATH
+  fi
+  if has_module_file $MODULE BUILD ; then
     run_module_file $MODULE BUILD
   else
     default_build
@@ -380,7 +383,7 @@
 
 run_post_build() {
   debug_msg "run_post_build ($@)"
-  if [ -s $SCRIPT_DIRECTORY/POST_BUILD ] ; then
+  if has_module_file $MODULE POST_BUILD ; then
     run_module_file $MODULE POST_BUILD
   fi
   default_post_build
@@ -390,7 +393,7 @@
 run_post_install() {
   debug_msg "run_post_install ($@)"
   plugin_call BUILD_POST_INSTALL $MODULE
-  if [ -s $SCRIPT_DIRECTORY/POST_INSTALL ] ; then
+  if has_module_file $MODULE POST_INSTALL ; then
     run_module_file $MODULE POST_INSTALL
   fi
 }

Modified: lunar/branches/stable/var/lib/lunar/functions/check.lunar
===================================================================
--- lunar/branches/stable/var/lib/lunar/functions/check.lunar	2006-03-21 22:49:23 UTC (rev 19372)
+++ lunar/branches/stable/var/lib/lunar/functions/check.lunar	2006-03-22 01:54:48 UTC (rev 19373)
@@ -61,8 +61,8 @@
   debug_msg "  run_depends ($@)"
    (
     if run_details $1 &> /dev/null ; then
-      if [ -s "$SCRIPT_DIRECTORY/DEPENDS" ] ; then
-      run_module_file $MODULE DEPENDS | grep -v '%'
+      if has_module_file $MODULE DEPENDS ; then
+        run_module_file $MODULE DEPENDS | grep -v '%'
       fi
     fi
    ) 
@@ -109,21 +109,34 @@
     MODULES=$(list_installed | grep -v moonbase)
   fi
 
+  if [[ -n "$FIXDEPENDS" ]] ; then
+    for MODULE in $MODULES ; do
+      fix_depends $MODULE
+    done
+    return
+  fi
+
+  # discover BROKEN modules
   for MODULE in $MODULES ; do
-    # ENV separation required here!
+    if ! run_checks $MODULE ; then
+       BROKEN_MODULES=( ${BROKEN_MODULES[@]} $MODULE )
+    fi
+  done
+
+  # if we were called with --fixdepends then we may skip the rest
+  if [ -n "$FIXDEPENDS" ] ; then
+    return
+  fi
+  
+  export TMP_LIN_SUCCESS=$(temp_create "successful")
+  export TMP_LIN_FAIL=$(temp_create "failed")
+
+  for MODULE in $(sort_by_dependency ${BROKEN_MODULES[@]}) ; do
     (
       run_details $MODULE &&
-      fix_depends $MODULE &&
-
-      # if we were called with --fixdepends then we may skip the rest
-      if [ -n "$FIXDEPENDS" ] ; then
-        continue
-      fi        
-
       if module_installed $MODULE && ! module_held $MODULE ; then
-
         if ! run_checks $MODULE ; then
-          if [ -n "$NOFIX" ] ; then
+          if [[ -n "$NOFIX" ]] ; then
             continue
           fi
           NEVER_ASK=1 DEPS_ONLY= satisfy_depends      &&
@@ -143,6 +156,11 @@
       fi
     )
   done
+
+  display_update_log fix
+  temp_destroy $TMP_LIN_SUCCESS
+  temp_destroy $TMP_LIN_FAIL
+
 }
 
 

Modified: lunar/branches/stable/var/lib/lunar/functions/depends.lunar
===================================================================
--- lunar/branches/stable/var/lib/lunar/functions/depends.lunar	2006-03-21 22:49:23 UTC (rev 19372)
+++ lunar/branches/stable/var/lib/lunar/functions/depends.lunar	2006-03-22 01:54:48 UTC (rev 19373)
@@ -223,7 +223,7 @@
   }
                                                                                 
   grep -q "^"$MODULE"\$" $TEMP_PREPAREDDEPS 2>/dev/null && return 0
-  if [ -s "$SCRIPT_DIRECTORY/DEPENDS" ] ; then
+  if has_module_file $MODULE DEPENDS ; then
     if [ -n "$SINGLE_MODULE" ] ; then
       # we only need to show this once, but we get here twice per module
       message  "${CHECK_COLOR}Checking dependencies for"  \
@@ -318,7 +318,9 @@
 
 run_conflicts() {
   debug_msg "run_conflicts ($@)"
-  run_module_file $MODULE CONFLICTS
+  if has_module_file $MODULE CONFLICTS ; then
+    run_module_file $MODULE CONFLICTS
+  fi
 }
 
 

Modified: lunar/branches/stable/var/lib/lunar/functions/download.lunar
===================================================================
--- lunar/branches/stable/var/lib/lunar/functions/download.lunar	2006-03-21 22:49:23 UTC (rev 19372)
+++ lunar/branches/stable/var/lib/lunar/functions/download.lunar	2006-03-22 01:54:48 UTC (rev 19373)
@@ -64,7 +64,7 @@
 		return 1
 	fi
 
-	MAX_SOURCES=${MAX_SOURCES:=100}
+	MAX_SOURCES=${MAX_SOURCES:-100}
 
 	# loop over all sources
 	for (( N = 0 ; N < MAX_SOURCES ; N++ )) ; do

Modified: lunar/branches/stable/var/lib/lunar/functions/init.lunar
===================================================================
--- lunar/branches/stable/var/lib/lunar/functions/init.lunar	2006-03-21 22:49:23 UTC (rev 19372)
+++ lunar/branches/stable/var/lib/lunar/functions/init.lunar	2006-03-22 01:54:48 UTC (rev 19373)
@@ -59,7 +59,7 @@
 # purpose  : force niceness on lunar's processes
 set_priority() {
   debug_msg "set_priority ($@)"
-  LUNAR_PRIORITY=${LUNAR_PRIORITY:="+10"}
+  LUNAR_PRIORITY=${LUNAR_PRIORITY:-"+10"}
   renice "$LUNAR_PRIORITY" -p $$ 2> /dev/null >/dev/null
 }
 

Modified: lunar/branches/stable/var/lib/lunar/functions/main.lunar
===================================================================
--- lunar/branches/stable/var/lib/lunar/functions/main.lunar	2006-03-21 22:49:23 UTC (rev 19372)
+++ lunar/branches/stable/var/lib/lunar/functions/main.lunar	2006-03-22 01:54:48 UTC (rev 19373)
@@ -288,10 +288,7 @@
   # now entering the physical BUILD stage
   if ! current_locked && ! solo_locked ; then
     echo $$ > $linING  &&
-    start_logging  &&
-    if [ -z "$BUILD" ] ; then
-      optimize
-    fi &&
+    start_logging
 
     if ! run_pre_build ; then
       LIN_ERROR="PRE_BUILD"

Modified: lunar/branches/stable/var/lib/lunar/functions/messages.lunar
===================================================================
--- lunar/branches/stable/var/lib/lunar/functions/messages.lunar	2006-03-21 22:49:23 UTC (rev 19372)
+++ lunar/branches/stable/var/lib/lunar/functions/messages.lunar	2006-03-22 01:54:48 UTC (rev 19373)
@@ -145,7 +145,7 @@
       echo -e -n "${QUERY_COLOR}$1 [$2] ${DEFAULT_COLOR}"
       read -t $PROMPT_DELAY -n 1 RESPONSE
       if [ -z "$RESPONSE" ]; then
-        RESPONSE=${RESPONSE:=$2}
+        RESPONSE=${RESPONSE:-$2}
       else
         echo
       fi

Modified: lunar/branches/stable/var/lib/lunar/functions/misc.lunar
===================================================================
--- lunar/branches/stable/var/lib/lunar/functions/misc.lunar	2006-03-21 22:49:23 UTC (rev 19372)
+++ lunar/branches/stable/var/lib/lunar/functions/misc.lunar	2006-03-22 01:54:48 UTC (rev 19373)
@@ -146,7 +146,7 @@
 custom_filters()
 {
 	local FILE
-	if [[ "${COMPRESS_MANPAGES:=on}" == "on" ]]; then
+	if [[ "${COMPRESS_MANPAGES:-on}" == "on" ]]; then
 		while read FILE; do
 			if [[ -f "$FILE" ]] ; then
 				if echo "$FILE" | grep '^/usr/share/man/.*\..$' | grep -q -v '\.gz$'; then

Modified: lunar/branches/stable/var/lib/lunar/functions/modules.lunar
===================================================================
--- lunar/branches/stable/var/lib/lunar/functions/modules.lunar	2006-03-21 22:49:23 UTC (rev 19372)
+++ lunar/branches/stable/var/lib/lunar/functions/modules.lunar	2006-03-22 01:54:48 UTC (rev 19373)
@@ -164,7 +164,7 @@
   local SECTION SECTIONS
   debug_msg "find_section ($@)"
 
-  if [[ "${ZLOCAL_OVERRIDES:=off}" == "on" ]] ; then
+  if [[ "${ZLOCAL_OVERRIDES:-off}" == "on" ]] ; then
     if SECTION=$(find "$MOONBASE/zlocal/" -type d -name $1 | sed -e "s|$MOONBASE/||;s|/$1$||" ) ; then
       if [[ -n "$SECTION" ]]; then
         echo $SECTION
@@ -238,25 +238,29 @@
 }
 
 
+has_module_file()
+{
+	if [[ -e "$SCRIPT_DIRECTORY/$2" ]] || [[ -e "$SCRIPT_DIRECTORY/$2.$PLATFORM" ]]; then
+		return 0
+	else
+		return 1
+	fi
+}
+
+
 # function : run_module_file
 # usage    : run_module_file $MODULE $SCRIPTNAME 
 # purpose  : runs the given script for a pre-defined module
 run_module_file() {
-  debug_msg "run_module_file ($@)"
-  if [ "$1" == "moonbase" ] ; then
-    return 0
-  fi
-  if [ -z "$SCRIPT_DIRECTORY" ] ; then
-    if ! run_details $1 > /dev/null ; then
-      return 1
-    fi
-  fi
-  CPU_ARCH=$(uname -m | sed 's/i[456]86/i386/')
-  if [ -e "$SCRIPT_DIRECTORY/$2.$CPU_ARCH" ]; then
-    . $SCRIPT_DIRECTORY/$2.$CPU_ARCH
-  elif [ -e "$SCRIPT_DIRECTORY/$2" ] ; then
-    . $SCRIPT_DIRECTORY/$2
-  fi    
+	debug_msg "run_module_file ($@)"
+	if [[ "$1" == "moonbase" ]] ; then
+		return 0
+	fi
+	if [[ -e "$SCRIPT_DIRECTORY/$2.$PLATFORM" ]]; then
+		. $SCRIPT_DIRECTORY/$2.$PLATFORM
+	elif [[ -e "$SCRIPT_DIRECTORY/$2" ]]; then
+		. $SCRIPT_DIRECTORY/$2
+	fi    
 }
 
 

Modified: lunar/branches/stable/var/lib/lunar/functions/optimize.lunar
===================================================================
--- lunar/branches/stable/var/lib/lunar/functions/optimize.lunar	2006-03-21 22:49:23 UTC (rev 19372)
+++ lunar/branches/stable/var/lib/lunar/functions/optimize.lunar	2006-03-22 01:54:48 UTC (rev 19373)
@@ -1,782 +1,68 @@
 #!/bin/bash
+############################################################
+#                                                          #
+# optimize.lunar - Lunar general optimization code         #
+#                                                          #
+############################################################
+#                                                          #
+# Copyright 2006 by Auke Kok under GPLv2                   #
+#                                                          #
+############################################################
 
-# All specified optimizations are system wide,
-#  and apply to any module built using lin.
 
-# All settings in this function may be adjusted
-#  in each modules BUILD script.
+bad_flags()
+{
+	debug_msg "bad_flags ($@)"
+	verbose_msg "bad_flags \"$@\""
 
-# $PLATFORM  = This sets the platform (x86, Sparc, PPC, etc..)
-#         specific optimizations for the machine
-# $BOPT = This sets the base optimizations (the -O level)
-#         it is applicable to all platforms and cpu types.
-# $CPU  = This sets the specific cpu and arch type.
-# $SPD  = This sets options that can increase the speed
-#         of compiled binaries.
-# $XTRA = This specifies what type of extra instructions
-#         to use for the specified cpu and platform.
-# $FPM  = This sets the Floating Point Math use
-#         of SSE instructions.
-# $LDF  = This sets the system wide linking optimizations.
-
-
-
-# Usage   : bad_flags "list of flags to remove"
-# Example : bad_flags -ffast-math -funroll-loops
-bad_flags() {
-  debug_msg "bad_flags ($@)"
-  verbose_msg "bad_flags \"$@\""
-  if [[ "$1" == "ALL" ]]; then
-    unset CFLAGS CXXFLAGS CPPFLAGS LDFLAGS
-  elif [[ "$1" == "compiler" ]]; then
-    unset CFLAGS CXXFLAGS CPPFLAGS
-  elif [[ "$1" == "linker" ]]; then
-    unset LDFLAGS
-  else
-    for BAD_FLAG in "$@" ; do
-      CFLAGS=$(echo $CFLAGS | sed s/$BAD_FLAG//)
-      CXXFLAGS=$(echo $CXXFLAGS | sed s/$BAD_FLAG//)
-      CPPFLAGS=$(echo $CPPFLAGS | sed s/$BAD_FLAG//)
-      LDFLAGS=$(echo $LDFLAGS | sed s/$BAD_FLAG//)
-    done
-  fi
+	# maintain some degree of backward compatibility here
+	if [[ "$1" == "ALL" ]]; then
+		unset CFLAGS CXXFLAGS CPPFLAGS LDFLAGS
+	elif [[ "$1" == "compiler" ]]; then
+		unset CFLAGS CXXFLAGS CPPFLAGS
+	elif [[ "$1" == "linker" ]]; then
+		unset LDFLAGS
+	else
+		for BAD_FLAG in "$@" ; do
+			CFLAGS=$(echo $CFLAGS | sed s/$BAD_FLAG//)
+			CXXFLAGS=$(echo $CXXFLAGS | sed s/$BAD_FLAG//)
+			CPPFLAGS=$(echo $CPPFLAGS | sed s/$BAD_FLAG//)
+			LDFLAGS=$(echo $LDFLAGS | sed s/$BAD_FLAG//)
+		done
+	fi
 }
 
 
-use_wrappers() {
-  debug_msg "use_wrappers ($@)"
-  if [ "${USE_WRAPPERS:-${GCCWRAPPERS:-on}}" == "on" ] ; then
-    verbose_msg "Enabling gcc wrapper scripts to force optimizations"
-    export PATH=/var/lib/lunar/compilers:${PATH}
-  fi  
-}
+optimize_menu()
+{(
+	export IFS=$'\t\n'
+	while true; do
+		if [ -z "$(plugin_call OPTIMIZE_MENU)" ]; then
+			$DIALOG --msgbox "There are no configurable compontents. Please update your moonbase!" 6 60
+			return
+		fi
+		PLUGIN=`$DIALOG --cancel-label "Close" --menu "Select a component for which to configure optimizations" 0 0 0 $(plugin_call OPTIMIZE_MENU)`
+		if [ $? != 0 ]; then
+			return
+		fi
+		
+		plugin_call OPTIMIZE_MENU $PLUGIN
+	done
+)}
 
 
-optimize_make() {
-  debug_msg "optimize_make ($@)"
-  if [ "$PSAFE" == "no" ] ; then
-   unset MAKES
-  elif [ "$MAKES" == "1" ] ; then
-   unset MAKES
-  fi
-  if module_installed linux-openmosix; then
-    $MAKE_EXT="$MAKE_EXT mosrun -h"
-  fi
-}
- 
+# because we pretty much need to know our $BUILD string
+# everywhere this code is separate and guides all other
+# parts of lunar where related things are done. Here we
+# autodetect the most important part but leave it open
+# to the user to override it
 
-optimize_base() {
-  debug_msg "optimize_base ($@)"
-   if ! [ "$1" ] ; then
-      BOPT="None"
-   fi
-
-   if [[ $CFLAGS ]]; then
-      unset CFLAGS CXXFLAGS 
-   fi
-
-   case $1 in
-      None)    CFLAGS="-O0"
-               CXXFLAGS="-O0"
-               ;;
-      Fast)    CFLAGS="-O1"
-               CXXFLAGS="-O1"
-               ;;
-      Faster)  CFLAGS="-O2"
-               CXXFLAGS="-O2"
-               ;;
-      Fastest) CFLAGS="-O3"
-               CXXFLAGS="-O3"
-               ;;
-        Small) CFLAGS="-Os"
-               CXXFLAGS="-Os"
-               ;;
-   esac
-}
-
-
-optimize_cpu()  {
-  debug_msg "optimize_cpu ($@)"
-   if ! [[ $1 ]]; then
-      if   [[ $PLATFORM == "Alpha" ]];   then
-         CPU="ev4"
-      elif [[ $PLATFORM == "PowerPC" ]]; then
-         CPU="powerpc"
-      elif [[ $PLATFORM == "SPARC" ]];   then
-         CPU="ultrasparc"
-      elif [[ $PLATFORM == "x86_64" ]];  then
-         CPU="x86_64"
-      else
-         CPU="I386"
-      fi
-   fi
-
-# Begin x86 options
-   case $1 in
-      I386)         CFLAGS="$CFLAGS -march=i386"
-                    CXXFLAGS="$CXXFLAGS -march=i386"
-                    BUILD="i386-pc-linux-gnu"
-                    ;;
-      I486)         CFLAGS="$CFLAGS -march=i486"
-                    CXXFLAGS="$CXXFLAGS -march=i486"
-                    BUILD="i486-pc-linux-gnu"
-                    ;;
-      I586)         CFLAGS="$CFLAGS -march=i586"
-                    CXXFLAGS="$CXXFLAGS -march=i586"
-                    BUILD="i586-pc-linux-gnu"
-                    ;;
-      I686)         CFLAGS="$CFLAGS -march=i686"
-                    CXXFLAGS="$CXXFLAGS -march=i686"
-                    BUILD="i686-pc-linux-gnu"
-                    ;;
-      Pentium)      CFLAGS="$CFLAGS -march=pentium"
-                    CXXFLAGS="$CXXFLAGS -march=pentium"
-                    BUILD="i586-pc-linux-gnu"
-                    ;;
-      PentiumMMX)   CFLAGS="$CFLAGS -march=pentium-mmx"
-                    CXXFLAGS="$CXXFLAGS -march=pentium-mmx"
-                    BUILD="i586-pc-linux-gnu"
-                    ;;
-      PentiumPro)   CFLAGS="$CFLAGS -march=pentiumpro"
-                    CXXFLAGS="$CXXFLAGS -march=pentiumpro"
-                    BUILD="i686-pc-linux-gnu"
-                    ;;
-      Pentium2)     if [[ $GCCVER == "3" ]];  then
-                       CFLAGS="$CFLAGS -march=pentium2"
-                       CXXFLAGS="$CXXFLAGS -march=pentium2"
-                       BUILD="i686-pc-linux-gnu"
-                    else
-                       CFLAGS="$CFLAGS -march=i686"
-                       CXXFLAGS="$CXXFLAGS -march=i686"
-                       BUILD="i686-pc-linux-gnu"
-                    fi
-                    ;;
-      Pentium3)     if [[ $GCCVER == "3" ]];  then
-                       CFLAGS="$CFLAGS -march=pentium3"
-                       CXXFLAGS="$CXXFLAGS -march=pentium3"
-                       BUILD="i686-pc-linux-gnu"
-                    else
-                       CFLAGS="$CFLAGS -march=i686"
-                       CXXFLAGS="$CXXFLAGS -march=i686"
-                       BUILD="i686-pc-linux-gnu"
-                    fi
-                    ;;
-      Pentium4)     if [[ $GCCVER == "3" ]];  then
-                       CFLAGS="$CFLAGS -march=pentium4"
-                       CXXFLAGS="$CXXFLAGS -march=pentium4"
-                       BUILD="i686-pc-linux-gnu"
-                    else
-                       CFLAGS="$CFLAGS -march=i686"
-                       CXXFLAGS="$CXXFLAGS -march=i686"
-                       BUILD="i686-pc-linux-gnu"
-                    fi
-                    ;;
-      K6)           if [[ $GCCVER == "3" ]];  then
-                       CFLAGS="$CFLAGS -march=k6"
-                       CXXFLAGS="$CXXFLAGS -march=k6"
-                       BUILD="i586-pc-linux-gnu"
-                    else
-                       CFLAGS="$CFLAGS -march=i586"
-                       CXXFLAGS="$CXXFLAGS -march=k6"
-                       BUILD="i586-pc-linux-gnu"
-                    fi
-                    ;;
-      K62)          if [[ $GCCVER == "3" ]];  then
-                       CFLAGS="$CFLAGS -march=k6-2"
-                       CXXFLAGS="$CXXFLAGS -march=k6-2"
-                       BUILD="i586-pc-linux-gnu"
-                    else
-                       CFLAGS="$CFLAGS -march=i586"
-                       CXXFLAGS="$CXXFLAGS -march=i586"
-                       BUILD="i586-pc-linux-gnu"
-                    fi
-                    ;;
-      K63)          if [[ $GCCVER == "3" ]];  then
-                       CFLAGS="$CFLAGS -march=k6-3"
-                       CXXFLAGS="$CXXFLAGS -march=k6-3"
-                       BUILD="i586-pc-linux-gnu"
-                    else
-                       CFLAGS="$CFLAGS -march=i586"
-                       CXXFLAGS="$CXXFLAGS -march=i586"
-                       BUILD="i586-pc-linux-gnu"
-                    fi
-                    ;;
-      Athlon)       if [[ $GCCVER == "3" ]];  then
-                       CFLAGS="$CFLAGS -march=athlon"
-                       CXXFLAGS="$CXXFLAGS -march=athlon"
-                       BUILD="i686-pc-linux-gnu"
-                    else
-                       CFLAGS="$CFLAGS -march=i686"
-                       CXXFLAGS="$CXXFLAGS -march=i686"
-                       BUILD="i686-pc-linux-gnu"
-                    fi
-                    ;;
-      AthlonTBird) if [[ $GCCVER == "3" ]];  then
-                       CFLAGS="$CFLAGS -march=athlon-tbird"
-                       CXXFLAGS="$CXXFLAGS -march=athlon-tbird"
-                       BUILD="i686-pc-linux-gnu"
-                    else
-                       CFLAGS="$CFLAGS -march=i686"
-                       CXXFLAGS="$CXXFLAGS -march=i686"
-                       BUILD="i686-pc-linux-gnu"
-                    fi
-                    ;;
-      Athlon4)     if [[ $GCCVER == "3" ]];  then
-                       CFLAGS="$CFLAGS -march=athlon-4"
-                       CXXFLAGS="$CXXFLAGS -march=athlon-4"
-                       BUILD="i686-pc-linux-gnu"
-                    else
-                       CFLAGS="$CFLAGS -march=i686"
-                       CXXFLAGS="$CXXFLAGS -march=i686"
-                       BUILD="i686-pc-linux-gnu"
-                    fi
-                    ;;
-      AthlonXP)    if [[ $GCCVER == "3" ]];  then
-                       CFLAGS="$CFLAGS -march=athlon-xp"
-                       CXXFLAGS="$CXXFLAGS -march=athlon-xp"
-                       BUILD="i686-pc-linux-gnu"
-                    else
-                       CFLAGS="$CFLAGS -march=i686"
-                       CXXFLAGS="$CXXFLAGS -march=i686"
-                       BUILD="i686-pc-linux-gnu"
-                    fi
-                    ;;
-      AthlonMP)    if [[ $GCCVER == "3" ]];  then
-                       CFLAGS="$CFLAGS -march=athlon-mp"
-                       CXXFLAGS="$CXXFLAGS -march=athlon-mp"
-                       BUILD="i686-pc-linux-gnu"
-                    else
-                       CFLAGS="$CFLAGS -march=i686"
-                       CXXFLAGS="$CXXFLAGS -march=i686"
-                       BUILD="i686-pc-linux-gnu"
-                    fi
-                    ;;
-      Athlon64)    if [[ $GCCVER == "3" ]];  then
-                       CFLAGS="$CFLAGS -march=athlon64"
-                       CXXFLAGS="$CXXFLAGS -march=athlon64"
-                       BUILD="i686-pc-linux-gnu"
-                    else
-                       CFLAGS="$CFLAGS -march=i686"
-                       CXXFLAGS="$CXXFLAGS -march=i686"
-                       BUILD="i686-pc-linux-gnu"
-                    fi
-                    ;;
-
-# Begin PowerPC options
-      common)  CFLAGS="$CFLAGS -mcpu=common"
-               CXXFLAGS="$CXXFLAGS -mcpu=common"
-               BUILD="power-linux"
-               ;;
-      rios)    CFLAGS="$CFLAGS -mcpu=rios"
-               CXXFLAGS="$CXXFLAGS -mcpu=rios"
-               BUILD="power-linux"
-               ;;
-      rios1)   CFLAGS="$CFLAGS -mcpu=rios1"
-               CXXFLAGS="$CXXFLAGS -mcpu=rios1"
-               BUILD="power-linux"
-               ;;
-      rsc)     CFLAGS="$CFLAGS -mcpu=rsc"
-               CXXFLAGS="$CXXFLAGS -mcpu=rsc"
-               BUILD="power-linux"
-               ;;
-      rios2)   CFLAGS="$CFLAGS -mcpu=rios2"
-               CXXFLAGS="$CXXFLAGS -mcpu=rios2"
-               BUILD="power-linux"
-               ;;
-      rs64a)   CFLAGS="$CFLAGS -mcpu=rs64a"
-               CXXFLAGS="$CXXFLAGS -mcpu=rs64a"
-               BUILD="powerpc64-linux"
-               ;;
-      403)    CFLAGS="$CFLAGS -mcpu=403"
-               CXXFLAGS="$CXXFLAGS -mcpu=403"
-               BUILD="powerpc-linux"
-               ;;
-      505)    CFLAGS="$CFLAGS -mcpu=505"
-               CXXFLAGS="$CXXFLAGS -mcpu=505"
-               BUILD="powerpc-linux"
-               ;;
-      601)    CFLAGS="$CFLAGS -mcpu=601"
-               CXXFLAGS="$CXXFLAGS -mcpu=601"
-               BUILD="powerpc-linux"
-               ;;
-      602)    CFLAGS="$CFLAGS -mcpu=602"
-               CXXFLAGS="$CXXFLAGS -mcpu=602"
-               BUILD="powerpc-linux"
-               ;;
-      603)    CFLAGS="$CFLAGS -mcpu=603"
-               CXXFLAGS="$CXXFLAGS -mcpu=603"
-               BUILD="powerpc-linux"
-               ;;
-      603e)   CFLAGS="$CFLAGS -mcpu=603e"
-               CXXFLAGS="$CXXFLAGS -mcpu=603e"
-               BUILD="powerpc-linux"
-               ;;
-      604)    CFLAGS="$CFLAGS -mcpu=604"
-               CXXFLAGS="$CXXFLAGS -mcpu=604"
-               BUILD="powerpc-linux"
-               ;;
-      604e)   CFLAGS="$CFLAGS -mcpu=604e"
-               CXXFLAGS="$CXXFLAGS -mcpu=604e"
-               BUILD="powerpc-linux"
-               ;;
-      620)    CFLAGS="$CFLAGS -mcpu=620"
-               CXXFLAGS="$CXXFLAGS -mcpu=620"
-               BUILD="powerpc64-linux"
-               ;;
-      630)    CFLAGS="$CFLAGS -mcpu=630"
-               CXXFLAGS="$CXXFLAGS -mcpu=630"
-               BUILD="powerpc-linux"
-               ;;
-      740)    CFLAGS="$CFLAGS -mcpu=740"
-               CXXFLAGS="$CXXFLAGS -mcpu=740"
-               BUILD="powerpc-linux"
-               ;;
-      7400)   CFLAGS="$CFLAGS -mcpu=7400"
-               CXXFLAGS="$CXXFLAGS -mcpu=7400"
-               BUILD="powerpc-linux"
-               ;;
-      7450)   CFLAGS="$CFLAGS -mcpu=7450"
-               CXXFLAGS="$CXXFLAGS -mcpu=7450"
-               BUILD="powerpc-linux"
-               ;;
-      750)    CFLAGS="$CFLAGS -mcpu=750"
-               CXXFLAGS="$CXXFLAGS -mcpu=750"
-               BUILD="powerpc-linux"
-               ;;
-      801)    CFLAGS="$CFLAGS -mcpu=801"
-               CXXFLAGS="$CXXFLAGS -mcpu=801"
-               BUILD="powerpc-linux"
-               ;;
-      821)    CFLAGS="$CFLAGS -mcpu=821"
-               CXXFLAGS="$CXXFLAGS -mcpu=821"
-               BUILD="powerpc-linux"
-               ;;
-      823)    CFLAGS="$CFLAGS -mcpu=823"
-               CXXFLAGS="$CXXFLAGS -mcpu=823"
-               BUILD="powerpc-linux"
-               ;;
-      860)    CFLAGS="$CFLAGS -mcpu=860"
-               CXXFLAGS="$CXXFLAGS -mcpu=860"
-               BUILD="powerpc-linux"
-               ;;
-      power)   CFLAGS="$CFLAGS -mcpu=power"
-               CXXFLAGS="$CXXFLAGS -mcpu=power"
-               BUILD="power-linux"
-               ;;
-      power2)  CFLAGS="$CFLAGS -mcpu=power2"
-               CXXFLAGS="$CXXFLAGS -mcpu=power2"
-               BUILD="power-linux"
-               ;;
-      PowerPC) CFLAGS="$CFLAGS -mcpu=powerpc"
-               CXXFLAGS="$CXXFLAGS -mcpu=powerpc"
-               BUILD="powerpc-linux"
-               ;;
-
-
-
-
-
-# Begin Alpha options
-      ev4)     CFLAGS="$CFLAGS -mcpu=ev4"
-               CXXFLAGS="$CXXFLAGS -mcpu=ev4"
-               BUILD="alpha-linux"
-               ;;
-      ev45)    CFLAGS="$CFLAGS -mcpu=ev4"
-               CXXFLAGS="$CXXFLAGS -mcpu=ev4"
-               BUILD="alpha-linux"
-               ;;
-      ev5)     CFLAGS="$CFLAGS -mcpu=ev5"
-               CXXFLAGS="$CXXFLAGS -mcpu=ev5"
-               BUILD="alpha-linux"
-               ;;
-      ev56)    CFLAGS="$CFLAGS -mcpu=ev56"
-               CXXFLAGS="$CXXFLAGS -mcpu=ev56"
-               BUILD="alpha-linux"
-               ;;
-      pca56)   CFLAGS="$CFLAGS -mcpu=pca56"
-               CXXFLAGS="$CXXFLAGS -mcpu=pca56"
-               BUILD="alpha-linux"
-               ;;
-      ev6)     CFLAGS="$CFLAGS -mcpu=ev6"
-               CXXFLAGS="$CXXFLAGS -mcpu=ev6"
-               BUILD="alpha-linux"
-               ;;
-      ev67)    CFLAGS="$CFLAGS -mcpu=ev67"
-               CXXFLAGS="$CXXFLAGS -mcpu=ev67"
-               BUILD="alpha-linux"
-               ;;
-      ev68)    CFLAGS="$CFLAGS -mcpu=ev67"
-               CXXFLAGS="$CXXFLAGS -mcpu=ev67"
-	       BUILD="alpha-linux"
-               ;;
-# Begin SPARC options
-      v7)            CFLAGS="$CFLAGS -mcpu=v7"
-                     CXXFLAGS="$CXXFLAGS -mcpu=v7"
-                     BUILD="sparc-linux"
-                     ;;
-      cypress)       CFLAGS="$CFLAGS -mcpu=cypress"
-                     CXXFLAGS="$CXXFLAGS -mcpu=cypress"
-                     BUILD="sparc-linux"
-                     ;;
-      v8)            CFLAGS="$CFLAGS -mcpu=v8"
-                     CXXFLAGS="$CXXFLAGS -mcpu=v8"
-                     BUILD="sparc-linux"
-                     ;;
-      supersparc)    CFLAGS="$CFLAGS -mcpu=supersparc"
-                     CXXFLAGS="$CXXFLAGS -mcpu=supersparc"
-                     BUILD="sparc-linux"
-                     ;;
-      sparclite)     CFLAGS="$CFLAGS =mcpu=sparclite"
-                     CXXFLAGS="$CXXFLAGS =mcpu=sparclite"
-                     BUILD="sparc-linux"
-                     ;;
-      hypersparc)    CFLAGS="$CFLAGS -mcpu=hypersparc"
-                     CXXFLAGS="$CXXFLAGS -mcpu=hypersparc"
-                     BUILD="sparc-linux"
-                     ;;
-      sparclite86x)  CFLAGS="$CFLAGS -mcpu=sparclite86x"
-                     CXXFLAGS="$CXXFLAGS -mcpu=sparclite86x"
-                     BUILD="sparc-linux"
-                     ;;
-      f930)          CFLAGS="$CFLAGS -mcpu=f930"
-                     CXXFLAGS="$CXXFLAGS -mcpu=f930"
-                     BUILD="sparc-linux"
-                     ;;
-      f934)          CFLAGS="$CFLAGS -mcpu=f934"
-                     CXXFLAGS="$CXXFLAGS -mcpu=f934"
-                     BUILD="sparc-linux"
-                     ;;
-      sparclet)      CFLAGS="$CFLAGS -mcpu=sparclet"
-                     CXXFLAGS="$CXXFLAGS -mcpu=sparclet"
-                     BUILD="sparc-linux"
-                     ;;
-      tsc701)        CFLAGS="$CFLAGS -mcpu=tsc701"
-                     CXXFLAGS="$CXXFLAGS -mcpu=tsc701"
-                     BUILD="sparc-linux"
-                     ;;
-      v9)            CFLAGS="$CFLAGS -mcpu=v9"
-                     CXXFLAGS="$CXXFLAGS -mcpu=v9"
-                     BUILD="sparc-linux"
-                     ;;
-      ultrasparc)    CFLAGS="$CFLAGS -mcpu=ultrasparc"
-                     CXXFLAGS="$CXXFLAGS -mcpu=ultrasparc"
-                     BUILD="sparc-linux"
-                     ;;
-      x86_64)        CFLAGS="$CFLAGS"
-                     CXXFLAGS="$CXXFLAGS"
-                     BUILD="x86_64-pc-linux-gnu"
-                     ;;
-   esac
-}
-
-
-optimize_speed() {
-  debug_msg "optimize_speed ($@)"
-   for A in ${SPD[@]}; do
-      case $A in
-             None) CFLAGS="$CFLAGS"
-                   CXXFLAGS="$CXXFLAGS"
-                 ;;
-           Speedy) CFLAGS="$CFLAGS -funroll-loops"
-                   CXXFLAGS="$CXXFLAGS -funroll-loops"
-                 ;;
-            Risky) CFLAGS="$CFLAGS -ffast-math"
-                   CXXFLAGS="$CXXFLAGS -ffast-math"
-                 ;;
-         Pointers) if [[ $GCCVER == "3" ]] ; then
-                     CFLAGS="$CFLAGS -fomit-frame-pointer"
-                     CXXFLAGS="$CXXFLAGS -fomit-frame-pointer"
-                   fi
-                 ;;
-         Siblings) if [[ $GCCVER == "3" ]] ; then
-                     CFLAGS="$CFLAGS -foptimize-sibling-calls"
-                     CXXFLAGS="$CXXFLAGS"
-                   fi
-                 ;;
-        Profiling) if [[ $GCCVER == "3" ]] ; then
-                     CFLAGS="$CFLAGS -fprofile-arcs"
-                     CXXFLAGS="$CXXFLAGS -fprofile-arcs"
-		     set_local_config "KEEP_SOURCE" "on"
-                   fi
-                 ;;
-        Branching) if [[ $GCCVER == "3" ]] ; then
-                     CFLAGS="$CFLAGS -fbranch-probabilities"
-                     CXXFLAGS="$CXXFLAGS -fbranch-probabilities"
-                   fi
-                 ;; 
-         Aliasing) if [[ $GCCVER == "3" ]] ; then
-                      CFLAGS="$CFLAGS -fstrict-aliasing"
-                      CXXFLAGS="$CXXFLAGS -fstrict-aliasing"
-                    fi
-                 ;;
-            Cprop) if [[ $GCCVER == "3" ]] ; then
-                     CFLAGS="$CFLAGS -fno-cprop-registers"
-                     CXXFLAGS="$CXXFLAGS -fno-cprop-registers"
-                   fi
-                 ;;
-            Float) if [[ $GCCVER == "3" ]] ; then
-                     CFLAGS="$CFLAGS -ffloat-store"
-                     CXXFLAGS="$CXXFLAGS -ffloat-store"
-                   fi
-                 ;;
-          Address) if [[ $GCCVER == "3" ]] ; then
-                     CFLAGS="$CFLAGS -fforce-addr"
-                     CXXFLAGS="$CXXFLAGS -fforce-addr"
-                   fi
-                 ;;
-            Align) if [[ $GCCVER == "3" ]] ; then
-                     CFLAGS="$CFLAGS -falign-functions -falign-loops -falign-jumps"
-                     CXXFLAGS="$CXXFLAGS -falign-functions -falign-loops -falign-jumps"
-                   fi
-                 ;;
-        Expensive) if [[ $GCCVER == "3" ]] ; then
-                     CFLAGS="$CFLAGS -fexpensive-optimizations"
-                     CXXFLAGS="$CXXFLAGS -fexpensive-optimizations"
-                   fi
-                 ;;
-          Doubles) if [[ $GCCVER == "3" ]] ; then
-                     CFLAGS="$CFLAGS -malign-double"
-                     CXXFLAGS="$CXXFLAGS -malign-double"
-                   fi
-		 ;;
-	   Tracer) if [[ $GCCVER == "3" ]] ; then
-	             CFLAGS="$CFLAGS -ftracer"
-		     CXXFLAGS="$CXXFLAGS -ftracer"
-		   fi
-                 ;;
-	   Blocks) if [[ $GCCVER == "3" ]] ; then
-	             CFLAGS="$CFLAGS -freorder-blocks"
-		     CXXFLAGS="$CXXFLAGS -freorder-blocks"
-		   fi
-                 ;;
-      esac
-   done
-}
-
-
-optimize_stack() {
-  debug_msg "optimize_stack ($@)"
-  if [[ $STACK > 0 ]] ; then
-    if [ $PLATFORM == "x86" ] ; then
-      CFLAGS="$CFLAGS -mpreferred-stack-boundary=$STACK"
-      CXXFLAGS="$CXXFLAGS -mpreferred-stack-boundary=$STACK"
-      CPPFLAGS="$CPPFLAGS -mpreferred-stack-boundary=$STACK"
-    fi
-  fi
-}
-
-
-optimize_extra() {
-  debug_msg "optimize_extra ($@)"
- for A in ${XTRA[@]}; do
-   case $A in
-     None)     CFLAGS="$CFLAGS"
-               CXXFLAGS="$CXXFLAGS"
-               ;;
-      MMX)     if [[ $GCCVER == "3" ]];  then
-                  CFLAGS="$CFLAGS -mmmx"
-                  CXXFLAGS="$CXXFLAGS -mmmx"
-               fi
-	       ;;
-      SSE)     if [[ $GCCVER == "3" ]];  then
-                  CFLAGS="$CFLAGS -msse"
-                  CXXFLAGS="$CXXFLAGS -msse"
-               fi
-	       ;;
-      SSE2)    if [[ $GCCVER == "3" ]];  then
-                  CFLAGS="$CFLAGS -msse2"
-                  CXXFLAGS="$CXXFLAGS -msse2"
-               fi
-	       ;;
-      SSE3)    if [[ $GCCVER == "3" ]];  then
-                  CFLAGS="$CFLAGS -msse3"
-                  CXXFLAGS="$CXXFLAGS -msse3"
-               fi
-	       ;;	       	       
-      dnow)   if [[ $GCCVER == "3" ]];  then
-                  CFLAGS="$CFLAGS -m3dnow"
-                  CXXFLAGS="$CXXFLAGS -m3dnow"
-               fi
-	       ;;
-      Altivec) if [[ $GCCVER == "3" ]];  then
-                  CFLAGS="$CFLAGS -maltivec"
-                  CXXFLAGS="$CXXFLAGS -maltivec"
-               fi
-	       ;;
-   esac
- done
-}
-
-
-# Set how floating point math is done
-optimize_fp() {
-  debug_msg "optimize_fp ($@)"
-   case $1 in
-      x387) if [[ $GCCVER == "3" ]];  then
-              CFLAGS="$CFLAGS -mfpmath=387"
-              CXXFLAGS="$CXXFLAGS -mfpmath=387"
-            fi
-	    ;;
-       SSE) if [[ $GCCVER == "3" ]];  then
-              CFLAGS="$CFLAGS -mfpmath=sse"
-              CXXFLAGS="$CXXFLAGS -mfpmath=sse"
-            fi
-	    ;;
-      Both) if [[ $GCCVER == "3" ]];  then
-              CFLAGS="$CFLAGS -mfpmath=sse,387"
-              CXXFLAGS="$CXXFLAGS -mfpmath=sse,387"
-            fi
-	    ;;
-      None) CFLAGS="$CFLAGS"
-            CXXFLAGS="$CXXFLAGS"
-            ;;
-   esac
-}
-
-
-# Set up the Linker optimizations
-optimize_ld() {
-  local WL
-  debug_msg "optimize_ld ($@)"
-  if [[ $LDFLAGS ]]; then
-    unset LDFLAGS
-  fi
-
-  for A in ${LDF[@]}; do
-    case $A in
-      Strip)     LDFLAGS="$LDFLAGS -s"           ;;
-      Optimize)  WL="$WL,-O1"                    ;;
-      Reduce)    WL="$WL,--as-needed"            ;;
-      Debug)     LDFLAGS="$LDFLAGS -S"           ;;
-      Combreloc) LDFLAGS="$LDFLAGS -z combreloc" ;;
-    esac
-  done
-  if [ -n "$WL" ]; then
-    LDFLAGS="$LDFLAGS -Wl$WL"
-  fi
-}
-
-
-optimize_addon() {
-  debug_msg "optimize_addon ($@)"
-  if ! [[ `grep ADDON /etc/lunar/local/optimizations` ]]; then
-    echo ADDON=\( None \) >> /etc/lunar/local/optimizations
-    ADDON=( None )
-  fi
-
-  for A in ${ADDON[@]}; do
-    case $A in
-      DistCC) if module_installed distcc; then
-                CC_EXT="$CC_EXT distcc"
-                CXX_EXT="$CXX_EXT distcc"
-              else
-                CC_EXT="$CC_EXT"
-                CXX_EXT="$CXX_EXT"
-              fi
-              ;;
-      CCache) if module_installed ccache; then
-                CC_EXT="ccache $CC_EXT"
-                CXX_EXT="ccache $CXX_EXT"
-              else
-                CC_EXT="$CC_EXT"
-                CXX_EXT="$CXX_EXT"
-              fi
-              ;;
-        GECC) CC_EXT="gecc"
-              CXX_EXT="gecc"
-              ;;
-    esac
-  done
-  verbose_msg "CC_EXT=\"$CC_EXT\", CXX_EXT=\"$CXX_EXT\""
-}
-
-
-optimize_cc_opt() {
-  debug_msg "optimize_cc_opt ($@)"
-  for W in ${CC_OPTS[@]}; do
-    case $W in
-      Deprecated)
-        CXXFLAGS="$CXXFLAGS -Wno-deprecated"
-        CPPFLAGS="$CPPFLAGS -Wno-deprecated"
-        ;;
-	  ccpipe)
-	    COPT="$COPT -pipe"
-	    ;;
-	  cxxpipe)
-	    CCOPT="$CCOPT -pipe"
-	    ;;
-    esac
-  done
-}
-
-
-optimize() {
-  debug_msg "optimize ($@)"
-  # Source in the optimization settings if it exists.
-  if [ -s /etc/lunar/local/optimizations ] ; then
-    . /etc/lunar/local/optimizations
-  else
-    verbose_msg "initializing optimizations with hard-coded defaults"
-    echo -e PLATFORM=x86            '\n'    \
-BUILD=i386-pc-linux-gnu '\n'    \
-MAKES=                  '\n'    \
-BOPT=-O0                '\n'    \
-CPU=i386                '\n'    \
-SPD=\( \)                 '\n'    \
-STACK=                  '\n'    \
-XTRA=\( \)                '\n'    \
-FPM=                    '\n'    \
-CC_OPTS=\( \)             '\n'    \
-LDF=\( \)                 '\n'    \
-ADDON=\( \) > /etc/lunar/local/optimizations
-  fi
-
-  #lets get the BUILD if it is not defined   
-  [ -z "$BUILD" ] && optimize_cpu $CPU
-  [ -n "$BUILD" ] && export BUILD || 
-  echo "Set your optimization preferences via lunar"
-
-  unset CFLAGS CXXFLAGS LDFLAGS
-
-  optimize_make     $MAKES     &&
-  optimize_base     $BOPT      &&
-  optimize_cpu      $CPU       &&
-  optimize_speed    ${SPD[@]}  &&
-  optimize_extra    ${XTRA[@]} &&
-  optimize_fp       $FPM       &&
-  optimize_cc_opt              &&
-  optimize_ld       ${LDF[@]}  &&
-  optimize_addon               &&
-
-  case $PLATFORM in
-    x86)
-      optimize_stack
-      ;;
-  esac
-
-  local GCC_REALVERSION=$(${COMPILER_PATH:-/usr/bin}/gcc --version | head -n 1 | awk '{print $3}')
-  if [ "$(echo $GCC_REALVERSION | cut -d. -f1,2)" == "3.4" \
-       -o "$(echo $GCC_REALVERSION | cut -d. -f1)" == "4" ] ; then
-    CFLAGS=$(echo $CFLAGS | sed 's:-mcpu:-mtune:')
-    CXXFLAGS=$(echo $CXXFLAGS | sed 's:-mcpu:-mtune:')
-  fi
-
-  export CC_EXT
-  export CXX_EXT
-  export MAKE_EXT
-  export COPT
-  export CCOPT
-  export CFLAGS
-  export CXXFLAGS
-  export LDFLAGS
-  export MAKES
-
-  use_wrappers
-  verbose_msg "BUILD=\"$BUILD\""
-  verbose_msg "GCCVER=\"$GCCVER\""
-  verbose_msg "CFLAGS=\"$CFLAGS\""
-  verbose_msg "CXXFLAGS=\"$CXXFLAGS\""
-  verbose_msg "LDFLAGS=\"$LDFLAGS\""
-}
-
-
+# PLATFORM - translated uname -m / arch
+PLATFORM=$(uname -m | sed 's/i[3456]86/x86/')
+# BUILD - 
+case $PLATFORM in
+	x86|x86_64)
+		BUILD=$(uname -m)-pc-linux-gnu ;;
+	*)		
+		BUILD=$(uname -m | sed 's/.*/\L&/g')-linux-gnu ;;
+esac

Modified: lunar/branches/stable/var/lib/lunar/functions/plugins.lunar
===================================================================
--- lunar/branches/stable/var/lib/lunar/functions/plugins.lunar	2006-03-21 22:49:23 UTC (rev 19372)
+++ lunar/branches/stable/var/lib/lunar/functions/plugins.lunar	2006-03-22 01:54:48 UTC (rev 19373)
@@ -37,6 +37,7 @@
 	# 12 - BUILD_POST_INSTALL        ,,     ,,     ,,    POST_INSTALL
 	# 13 - BUILD_PRE_REMOVE          ,,     ,,     ,,    PRE_REMOVE
 	# 14 - BUILD_POST_REMOVE         ,,     ,,     ,,    POST_REMOVE
+	# 15 - OPTIMIZE_MENU           Display optimization menu's
 	LUNAR_PLUGINS=(${LUNAR_PLUGINS[@]} "$1:$2")
 	((LUNAR_PLUGIN_COUNT++))
 	debug_msg "Registered plugin #$LUNAR_PLUGIN_COUNT, $1 -> $2()"
@@ -50,8 +51,8 @@
 	REQUESTED_TYPE=$1
 	shift
 	for ((COUNT=0; COUNT < $LUNAR_PLUGIN_COUNT; COUNT++)); do
-		THIS_TYPE=$(echo ${LUNAR_PLUGINS[$COUNT]} | cut -d: -f1)
-		THIS_HANDLER=$(echo ${LUNAR_PLUGINS[$COUNT]} | cut -d: -f2-)
+		THIS_TYPE=${LUNAR_PLUGINS[$COUNT]%%:*}
+		THIS_HANDLER=${LUNAR_PLUGINS[$COUNT]#*:}
 		if [ "$REQUESTED_TYPE" == "$THIS_TYPE" ]; then
 			# we have identified a valid plugin for this type
 			$THIS_HANDLER $@

Modified: lunar/branches/stable/var/lib/lunar/functions/sources.lunar
===================================================================
--- lunar/branches/stable/var/lib/lunar/functions/sources.lunar	2006-03-21 22:49:23 UTC (rev 19372)
+++ lunar/branches/stable/var/lib/lunar/functions/sources.lunar	2006-03-22 01:54:48 UTC (rev 19373)
@@ -40,7 +40,7 @@
 sources() {
 (
   debug_msg "sources ($@)"
-  MAX_SOURCES=${MAX_SOURCES:=100}
+  MAX_SOURCES=${MAX_SOURCES:-100}
 
   if ! run_details $1 ; then
     return 1
@@ -96,7 +96,7 @@
 verify_all_sources() {
 (
   debug_msg "verify_all_sources ($@)"
-  MAX_SOURCES=${MAX_SOURCES:=100}
+  MAX_SOURCES=${MAX_SOURCES:-100}
 
   if ! run_details $1 ; then
     return 1
@@ -170,7 +170,7 @@
 
   cd $BUILD_DIRECTORY
   DEAD_DIR=$1
-  DEAD_DIR=${DEAD_DIR:=$SOURCE_DIRECTORY}
+  DEAD_DIR=${DEAD_DIR:-$SOURCE_DIRECTORY}
 
   verbose_msg "destroying building dir \"$DEAD_DIR\""
   if [ "$TMPFS" != "off" ] ; then
@@ -193,7 +193,7 @@
   fi
   cd "$BUILD_DIRECTORY"
   NEW_DIR=$1
-  NEW_DIR=${NEW_DIR:=$SOURCE_DIRECTORY}
+  NEW_DIR=${NEW_DIR:-$SOURCE_DIRECTORY}
 
   verbose_msg "creating building dir \"$NEW_DIR\""
   if [ "$TMPFS" != "off" ] ; then 

Modified: lunar/branches/stable/var/lib/lunar/functions/updatelog.lunar
===================================================================
--- lunar/branches/stable/var/lib/lunar/functions/updatelog.lunar	2006-03-21 22:49:23 UTC (rev 19372)
+++ lunar/branches/stable/var/lib/lunar/functions/updatelog.lunar	2006-03-22 01:54:48 UTC (rev 19373)
@@ -37,13 +37,13 @@
   local NUMSUCCESS NUMFAILURES
   debug_msg "display_success_info ($@)"
 
-  NUMSUCCESS=$(cat $TMP_LIN_SUCCESS | wc -l)
-  NUMFAILURES=$(cat $TMP_LIN_FAIL | wc -l)
+  NUMSUCCESS=$(wc -l $TMP_LIN_SUCCESS | cut -d" " -f1)
+  NUMFAILURES=$(wc -l $TMP_LIN_FAIL | cut -d" " -f1)
 
   message
   message  "${MESSAGE_COLOR}Lunar $1 completed at `date`${DEFAULT_COLOR}"
-  message  "Successful  : " $NUMSUCCESS
-  message  "Failed      : " $NUMFAILURES  
+  message  "Successful  : $NUMSUCCESS"
+  message  "Failed      : $NUMFAILURES"  
   message  
   
   if  [  "$NUMSUCCESS" -gt "0"  ]; then   

Modified: lunar/branches/stable/var/lib/lunar/menu/dmodule.menu
===================================================================
--- lunar/branches/stable/var/lib/lunar/menu/dmodule.menu	2006-03-21 22:49:23 UTC (rev 19372)
+++ lunar/branches/stable/var/lib/lunar/menu/dmodule.menu	2006-03-22 01:54:48 UTC (rev 19373)
@@ -32,8 +32,8 @@
 some common criteria. Better do not hack by yourself."
 
  LUNAR_MODULES=$(echo "$LUNAR_MODULES" | tr " " "\t")
- LUNAR_MODULES=${LUNAR_MODULES:=lunar}
- LUNAR_MODULE=${LUNAR_MODULE:=lunar}
+ LUNAR_MODULES=${LUNAR_MODULES:-lunar}
+ LUNAR_MODULE=${LUNAR_MODULE:-lunar}
 
  unset SDM
  for LUNAR in $LUNAR_MODULES ; do

Modified: lunar/branches/stable/var/lib/lunar/menu/download.menu
===================================================================
--- lunar/branches/stable/var/lib/lunar/menu/download.menu	2006-03-21 22:49:23 UTC (rev 19372)
+++ lunar/branches/stable/var/lib/lunar/menu/download.menu	2006-03-22 01:54:48 UTC (rev 19373)
@@ -140,8 +140,8 @@
 This option can also be set per module basis. Add
 FTP_ACTIVE=on in DETAILS file :=) or vice-versa."
 
-   FTP_ACTIVE=${FTP_ACTIVE:=off}
-   FTP_PASSIVE=${FTP_PASSIVE:=on}
+   FTP_ACTIVE=${FTP_ACTIVE:-off}
+   FTP_PASSIVE=${FTP_PASSIVE:-on}
 
    [ "$FTP_ACTIVE" == "on" ] && 
    FTP_PASSIVE=off || 
@@ -176,7 +176,7 @@
 This option can also be set per module basis. Add
 CONTINUE=off in DETAILS file :=) or vice-versa."
 
-   CONTINUE=${CONTINUE:=on}
+   CONTINUE=${CONTINUE:-on}
 
    PARTIAL=`$DIALOG  --title "Partial Downloads" \
                             --ok-label  "Commit" \
@@ -207,7 +207,7 @@
 This option can also be set per module basis. Add
 USE_CACHE=off in DETAILS file :=) or vice-versa."
 
-   USE_CACHE=${USE_CACHE:=on}
+   USE_CACHE=${USE_CACHE:-on}
 
    CACHE=`$DIALOG  --title "Cache Usage" \
                             --ok-label  "Commit" \
@@ -236,7 +236,7 @@
 This option can also be set per module basis. Add
 NUM_RETRY=<n> in DETAILS file :=)"
 
-  NUM_RETRY=${NUM_RETRY:=5}
+  NUM_RETRY=${NUM_RETRY:-5}
 
   if  NUM_RETRY=`$DIALOG  --title "Number of Retries" \
                           --ok-label  "Commit"        \
@@ -257,7 +257,7 @@
 should be reported to maintainer at lunar-linux.org.
 "
 
-  EXHAUSTIVE=${EXHAUSTIVE:=off}
+  EXHAUSTIVE=${EXHAUSTIVE:-off}
 
   EXHAUSTIVE=`$DIALOG  --title "Exhaustive mirror testing: " \
              --ok-label  "Commit" \

Modified: lunar/branches/stable/var/lib/lunar/plugins/download-generic.plugin
===================================================================
--- lunar/branches/stable/var/lib/lunar/plugins/download-generic.plugin	2006-03-21 22:49:23 UTC (rev 19372)
+++ lunar/branches/stable/var/lib/lunar/plugins/download-generic.plugin	2006-03-22 01:54:48 UTC (rev 19373)
@@ -46,7 +46,7 @@
     WGET_RATE="--limit-rate=${DOWNLOAD_RATE}"
   fi
 
-  WGET_RETRIES="--tries=${NUM_RETRY:=5}"
+  WGET_RETRIES="--tries=${NUM_RETRY:-5}"
 
   [ -n "$http_proxy" ] && export http_proxy=$http_proxy
   [ -n  "$ftp_proxy" ] && export  ftp_proxy=$ftp_proxy

Modified: lunar/branches/stable/var/lib/lunar/unset.sh
===================================================================
--- lunar/branches/stable/var/lib/lunar/unset.sh	2006-03-21 22:49:23 UTC (rev 19372)
+++ lunar/branches/stable/var/lib/lunar/unset.sh	2006-03-22 01:54:48 UTC (rev 19373)
@@ -32,8 +32,6 @@
 unset FTP_ACTIVE
 unset FUNCTIONS
 unset GARBAGE
-unset GCCVER
-unset GCCWRAPPERS
 unset GNOME_URL
 unset GNU_URL
 unset GREEN



More information about the Lunar-commits mailing list