[Lunar-commits] r27019 - in lunar/branches/stable: sbin var/lib/lunar/functions var/lib/lunar/menu

Auke Kok sofar at lunar-linux.org
Tue Apr 1 23:55:50 CEST 2008


Author: sofar
Date: 2008-04-01 23:55:50 +0200 (Tue, 01 Apr 2008)
New Revision: 27019

Modified:
   lunar/branches/stable/sbin/lin
   lunar/branches/stable/var/lib/lunar/functions/config.lunar
   lunar/branches/stable/var/lib/lunar/menu/download.menu
Log:
Merge from theedge: minor fixes only.


Modified: lunar/branches/stable/sbin/lin
===================================================================
--- lunar/branches/stable/sbin/lin	2008-04-01 21:52:59 UTC (rev 27018)
+++ lunar/branches/stable/sbin/lin	2008-04-01 21:55:50 UTC (rev 27019)
@@ -86,14 +86,15 @@
     if [ -z "$TEMP_DOWNLOAD_PIDS" ] ; then
       export TEMP_DOWNLOAD_PIDS=$(temp_create "download-pids")
       export TEMP_PREPAREDDEPS=$(temp_create "prepared-depends")
-      export TEMP_CONFIGOPTS=$(temp_create "configopts")
     fi
+    export TEMP_CONFIGOPTS=$(temp_create "configopts")
 
     # pass 1 : run full dependency checking
     # This pass does configuration and dependency identification.
     if ! DEPS_ONLY=--deps build_depends $MODULES ; then
       temp_destroy $TEMP_DOWNLOAD_PIDS
       temp_destroy $TEMP_PREPAREDDEPS
+      temp_destroy $TEMP_CONFIGOPTS
       verbose_msg "Unexpected errors, bailing out!"
       exit 1
     fi

Modified: lunar/branches/stable/var/lib/lunar/functions/config.lunar
===================================================================
--- lunar/branches/stable/var/lib/lunar/functions/config.lunar	2008-04-01 21:52:59 UTC (rev 27018)
+++ lunar/branches/stable/var/lib/lunar/functions/config.lunar	2008-04-01 21:55:50 UTC (rev 27019)
@@ -23,9 +23,13 @@
 	local LINE NEW FILE VAR
 	debug_msg "set_config ($@)"
 
-	LINE=$(grep -w "$2=.*" $1)
+	# remove leading/trailing whitespace
+	VAR=${2#"${2%%[![:space:]]*}"}
+	VAR=${VAR%%+([[:space:]])}
+
+	LINE=$(grep -w "$VAR=.*" $1)
 	FILE=$1
-	VAR=$2
+
 	shift 2
 	if [ "$FILE" == "$LOCAL_CONFIG" ] ; then
 		NEW="$(printf "%16s" "$VAR")=\"$@\""
@@ -40,9 +44,7 @@
 
 	lock_file $FILE &&
 	if [ -n "$LINE" ] ; then
-		# make sure we escape those ':' characters:
-		LINE=$(echo $LINE | sed 's/:/\\:/g')
-		sedit "/[^ ]$VAR=/d" $FILE
+		sedit "/^\s*$VAR=/d" $FILE
 	fi
 	echo "$NEW" >> $FILE
 	unlock_file $FILE

Modified: lunar/branches/stable/var/lib/lunar/menu/download.menu
===================================================================
--- lunar/branches/stable/var/lib/lunar/menu/download.menu	2008-04-01 21:52:59 UTC (rev 27018)
+++ lunar/branches/stable/var/lib/lunar/menu/download.menu	2008-04-01 21:55:50 UTC (rev 27019)
@@ -113,17 +113,17 @@
   fi
 }
 
-set_cvs_threshold()  {
-  PROMPT="Please enter the minimum time between CVS updates in minutes, \
+set_repository_threshold()  {
+  PROMPT="Please enter the minimum time between repository updates in minutes, \
 enter 0 for no threshold. Default threshold is 10 minutes"
 
-  if  CVS_THRESHOLD=`$DIALOG  --title "CVS threshold" \
+  if  REPOSITORY_THRESHOLD=`$DIALOG  --title "Repository threshold" \
                               --ok-label  "Commit"    \
                               --inputbox              \
                               "$PROMPT"               \
-                               0 0  "$CVS_THRESHOLD"`
+                               0 0  "$REPOSITORY_THRESHOLD"`
   then
-    set_local_config "CVS_THRESHOLD" "$CVS_THRESHOLD"
+    set_local_config "REPOSITORY_THRESHOLD" "$REPOSITORY_THRESHOLD"
   fi
 }
 
@@ -286,7 +286,7 @@
     R_HELP="Per process download rate"
     P_HELP="Proxy Settings"
     E_HELP="Test all mirrors available on download"
-    T_HELP="CVS update threshold time"
+    T_HELP="Repository update threshold time"
 
     COMMAND=`$DIALOG  --title "Download Options"               \
                       --item-help                              \
@@ -295,25 +295,25 @@
                       --menu                                   \
                       ""                                       \
                       0 40 8                                   \
-                      "A"  "Ftp Active/Passive"     "$A_HELP"  \
-                      "C"  "Partial Downloads"      "$C_HELP"  \
-                      "H"  "Cache Usage"            "$H_HELP"  \
-                      "N"  "Number of Retries"      "$N_HELP"  \
-                      "P"  "Proxies"                "$P_HELP"  \
-                      "R"  "Download Rate"          "$R_HELP"  \
-		      "E"  "Exhaustive mirrors"     "$E_HELP"  \
-		      "T"  "CVS update threshold"   "$T_HELP"`
+                      "A"  "Ftp Active/Passive"          "$A_HELP"  \
+                      "C"  "Partial Downloads"           "$C_HELP"  \
+                      "H"  "Cache Usage"                 "$H_HELP"  \
+                      "N"  "Number of Retries"           "$N_HELP"  \
+                      "P"  "Proxies"                     "$P_HELP"  \
+                      "R"  "Download Rate"               "$R_HELP"  \
+		      "E"  "Exhaustive mirrors"          "$E_HELP"  \
+		      "T"  "Repository update threshold" "$T_HELP"`
 
   do
     case  $COMMAND in
-      A)  set_ftp_active         ;;
-      C)  set_partial_downloads  ;;
-      H)  set_cache_usage        ;;
-      N)  set_retries            ;;
-      P)  proxy_menu             ;;
-      R)  set_download_rate      ;;
-      E)  set_exhaustive         ;;
-      T)  set_cvs_threshold      ;;
+      A)  set_ftp_active           ;;
+      C)  set_partial_downloads    ;;
+      H)  set_cache_usage          ;;
+      N)  set_retries              ;;
+      P)  proxy_menu               ;;
+      R)  set_download_rate        ;;
+      E)  set_exhaustive           ;;
+      T)  set_repository_threshold ;;
     esac
   done
 }



More information about the Lunar-commits mailing list