CVS: brutus/elaine/lunar+versions/functions check.lunar, 1.1, 1.2 edit.lunar, 1.1, 1.2 install.lunar, 1.3, 1.4 modules.lunar, 1.1, 1.2 temp.lunar, 1.1, 1.2 tracking.lunar, 1.1, 1.2

elaine at lunar-linux.org elaine at lunar-linux.org
Sat Sep 6 20:26:42 GMT 2003


Update of /var/cvs/lunar/brutus/elaine/lunar+versions/functions
In directory dbguin.lunar-linux.org:/tmp/cvs-serv16604

Modified Files:
	check.lunar edit.lunar install.lunar modules.lunar temp.lunar 
	tracking.lunar 
Log Message:
Moved sedit into a function mv_edit(), changed/regularized vbl name


Index: check.lunar
===================================================================
RCS file: /var/cvs/lunar/brutus/elaine/lunar+versions/functions/check.lunar,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- check.lunar	5 Sep 2003 01:15:08 -0000	1.1
+++ check.lunar	6 Sep 2003 20:26:40 -0000	1.2
@@ -258,12 +258,12 @@
                                                                                 
   # here starts the real work:
   MODULE=$1
-  MOD_SNAME=$(echo $MODULE | sed 's:/:.:g')
+ mv_edit( $MODULE )
                                                                                 
   # base vars needed to execute DEPENDS
   SECTION=$(find_section $MODULE)
   SCRIPT_DIRECTORY=$MOONBASE/$SECTION/$MODULE
-  MODULE_CONFIG=$DEPENDS_CONFIG/$MOD_SNAME
+  MODULE_CONFIG=$DEPENDS_CONFIG/$MOD_V_SNAME
                                                                                 
   # reroute depends output to our private files:
   OLD_DEPENDS_STATUS=$DEPENDS_STATUS

Index: edit.lunar
===================================================================
RCS file: /var/cvs/lunar/brutus/elaine/lunar+versions/functions/edit.lunar,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- edit.lunar	5 Sep 2003 01:15:08 -0000	1.1
+++ edit.lunar	6 Sep 2003 20:26:40 -0000	1.2
@@ -79,3 +79,10 @@
 }
 
 
+# function : mv_edit
+# usage    : mv_edit $VARIABLE
+# purpose  : creates a 'safe' value in variable "$MOD_V_SNAME"
+mv_edit() {
+  MOD_SNAME=$(echo $1 | sed 's:/:.:g') 
+  return 0
+}

Index: install.lunar
===================================================================
RCS file: /var/cvs/lunar/brutus/elaine/lunar+versions/functions/install.lunar,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- install.lunar	5 Sep 2003 13:25:29 -0000	1.3
+++ install.lunar	6 Sep 2003 20:26:40 -0000	1.4
@@ -124,12 +124,12 @@
 
 stop_logging() {
   debug_msg "stop_logging ($@)"
-  MOD_SNAME=$(echo $MODULE | sed 's:/:.:g')
+ mv_edit( $MODULE )
   message  "${MESSAGE_COLOR}Creating"                        \
-           "${FILE_COLOR}$COMPILE_LOGS/$MOD_SNAME-$VERSION.bz2"  \
+           "${FILE_COLOR}$COMPILE_LOGS/$MOD_V_SNAME-$VERSION.bz2"  \
            "${DEFAULT_COLOR}"
 
-  bzip2 -9f < $C_LOG > $COMPILE_LOGS/$MOD_SNAME-$VERSION.bz2
+  bzip2 -9f < $C_LOG > $COMPILE_LOGS/$MOD_V_SNAME-$VERSION.bz2
   temp_destroy $C_LOG
   temp_destroy $C_FIFO
 }
@@ -137,9 +137,9 @@
 
 start_logging () {
   debug_msg "start_logging  ($@)"
-  MOD_SNAME=$(echo $MODULE | sed 's:/:.:g')
-  export C_LOG=$(temp_create "${MOD_SNAME}.compile-log")
-  export C_FIFO=$(temp_create "${MOD_SNAME}.compile-fifo")
+ mv_edit( $MODULE )
+  export C_LOG=$(temp_create "${MOD_V_SNAME}.compile-log")
+  export C_FIFO=$(temp_create "${MOD_V_SNAME}.compile-fifo")
 
   # just remaking this as FIFO
   rm -f $C_FIFO
@@ -360,8 +360,8 @@
   export INSTALLWATCHFILE=$(temp_create "$MODULE.installwatch")
 
   # lock the module for installation, check for moonbase call
-  MOD_SNAME=$(echo $MODULE | sed 's:/:.:g')
-  linING="/var/lock/installing.$MOD_SNAME"
+ mv_edit( $MODULE )
+  linING="/var/lock/installing.$MOD_V_SNAME"
   if [ "$MODULE" == "moonbase" ] ; then
     if ! current_locked && ! solo_locked ; then
       echo $$ > $linING       &&
@@ -413,7 +413,7 @@
       sound FAILURE
       message "${PROBLEM_COLOR}! Problem detected during ${FILE_COLOR}$LIN_ERROR${DEFAULT_COLOR}"
       rm -f $linING
-      report $COMPILE_LOGS/$MOD_SNAME-$VERSION.bz2 "compile log" $MODULE $VERSION
+      report $COMPILE_LOGS/$MOD_V_SNAME-$VERSION.bz2 "compile log" $MODULE $VERSION
       activity_log  "lin"  "$MODULE"  "$VERSION"  "failed" "Due to build errors during $LIN_ERROR"
       return 1
     fi  
@@ -434,13 +434,13 @@
       sound FAILURE
       message "${PROBLEM_COLOR}! Problem detected during ${FILE_COLOR}$LIN_ERROR${DEFAULT_COLOR}"
       rm -f $linING
-      report $COMPILE_LOGS/$MOD_SNAME-$VERSION.bz2 "compile log" $MODULE $VERSION
+      report $COMPILE_LOGS/$MOD_V_SNAME-$VERSION.bz2 "compile log" $MODULE $VERSION
       activity_log  "lin"  "$MODULE"  "$VERSION"  "failed" "Due to build errors during $LIN_ERROR"
       return 1
     fi
 
     rm_source_dir               &&
-    report $INSTALL_LOGS/$MOD_SNAME-$VERSION "install log" $MODULE $VERSION &&
+    report $INSTALL_LOGS/$MOD_V_SNAME-$VERSION "install log" $MODULE $VERSION &&
     rm -f $linING               &&
     sound SUCCESS               &&
     activity_log  "lin"  "$MODULE"  "$VERSION"  "success"
@@ -449,7 +449,7 @@
       sound FAILURE
       message "${PROBLEM_COLOR}! Problem detected${DEFAULT_COLOR}"
       rm -f $linING
-      report $COMPILE_LOGS/$MOD_SNAME-$VERSION.bz2 "compile log" $MODULE $VERSION
+      report $COMPILE_LOGS/$MOD_V_SNAME-$VERSION.bz2 "compile log" $MODULE $VERSION
       activity_log  "lin"  "$MODULE"  "$VERSION"  "failed" "Due to build errors during or after $LIN_ERROR"
       return 1
     fi

Index: modules.lunar
===================================================================
RCS file: /var/cvs/lunar/brutus/elaine/lunar+versions/functions/modules.lunar,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- modules.lunar	5 Sep 2003 01:15:08 -0000	1.1
+++ modules.lunar	6 Sep 2003 20:26:40 -0000	1.2
@@ -200,8 +200,8 @@
     SCRIPT_DIRECTORY=$MOONBASE/$SECTION/$1
     run_module_file $1 DETAILS &> /dev/null &&
     SOURCE_DIRECTORY=${SOURCE_DIRECTORY:-$BUILD_DIRECTORY/$1-$VERSION}
-    MOD_SNAME=$(echo $1 | sed 's:/:.:g')
-    MODULE_CONFIG=${MODULE_CONFIG:-$DEPENDS_CONFIG/$MOD_SNAME}
+   mv_edit( $1 )
+    MODULE_CONFIG=${MODULE_CONFIG:-$DEPENDS_CONFIG/$MOD_V_SNAME}
 
     return 0
   fi

Index: temp.lunar
===================================================================
RCS file: /var/cvs/lunar/brutus/elaine/lunar+versions/functions/temp.lunar,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- temp.lunar	5 Sep 2003 01:15:08 -0000	1.1
+++ temp.lunar	6 Sep 2003 20:26:40 -0000	1.2
@@ -20,7 +20,8 @@
 temp_create() {
   debug_msg "temp_create ($@)"
   TMPDIR=${TMPDIR:-/var/tmp}
-  TMPFILE=$(echo $1 | sed 's:/:.:g')
+  mv_edit($1)
+  TMPFILE=$MOD_V_SNAME
   if TMPFILE=$(mktemp -p "$TMPDIR" -t lunar.`basename $0`.$$.$TMPFILE.XXXXXXXXXX ) ; then
     echo $TMPFILE
   else

Index: tracking.lunar
===================================================================
RCS file: /var/cvs/lunar/brutus/elaine/lunar+versions/functions/tracking.lunar,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- tracking.lunar	5 Sep 2003 01:15:08 -0000	1.1
+++ tracking.lunar	6 Sep 2003 20:26:40 -0000	1.2
@@ -70,10 +70,10 @@
 create_install_log() {
 
   debug_msg "create_install_log ($@)"
-  MOD_SNAME=$(echo $MODULE | sed 's:/:.:g')
+ mv_edit( $MODULE )
 
   TMP_INST_LOG=$(temp_create "install-log")
-  INST_LOG="$INSTALL_LOGS/$MOD_SNAME-$VERSION"
+  INST_LOG="$INSTALL_LOGS/$MOD_V_SNAME-$VERSION"
   rm -f $INST_LOG &> /dev/null
 
   message  "${MESSAGE_COLOR}Creating ${FILE_COLOR}${INST_LOG}${DEFAULT_COLOR}"
@@ -87,9 +87,9 @@
   filter  "$LOCAL_EXCLUDED"  |
   exists                     >  $TMP_INST_LOG
 
-  echo "$INSTALL_LOGS/$MOD_SNAME-$VERSION"                 >> $TMP_INST_LOG
-  echo "$COMPILE_LOGS/$MOD_SNAME-$VERSION.bz2"             >> $TMP_INST_LOG
-  echo "$MD5SUM_LOGS/$MOD_SNAME-$VERSION"                  >> $TMP_INST_LOG
+  echo "$INSTALL_LOGS/$MOD_V_SNAME-$VERSION"                 >> $TMP_INST_LOG
+  echo "$COMPILE_LOGS/$MOD_V_SNAME-$VERSION.bz2"             >> $TMP_INST_LOG
+  echo "$MD5SUM_LOGS/$MOD_V_SNAME-$VERSION"                  >> $TMP_INST_LOG
 
   MISOWNED_SYMLINKS=$(syms_not_owned  $TMP_INST_LOG
                       echo  -n  "/dev/null")
@@ -106,28 +106,28 @@
 
 create_md5sum_log()  {
   debug_msg "create_md5sum_log ($@)"
-  MOD_SNAME=$(echo $MODULE | sed 's:/:.:g')
+ mv_edit( $MODULE )
 
-  rm -f $MD5SUM_LOGS/$MOD_SNAME-$VERSION &> /dev/null
+  rm -f $MD5SUM_LOGS/$MOD_V_SNAME-$VERSION &> /dev/null
   
-  message "${MESSAGE_COLOR}Creating ${FILE_COLOR}$MD5SUM_LOGS/$MOD_SNAME-$VERSION${DEFAULT_COLOR}"
+  message "${MESSAGE_COLOR}Creating ${FILE_COLOR}$MD5SUM_LOGS/$MOD_V_SNAME-$VERSION${DEFAULT_COLOR}"
 
-  files < $INSTALL_LOGS/$MOD_SNAME-$VERSION | while read FILE ; do
-    md5sum $FILE >> $MD5SUM_LOGS/$MOD_SNAME-$VERSION
+  files < $INSTALL_LOGS/$MOD_V_SNAME-$VERSION | while read FILE ; do
+    md5sum $FILE >> $MD5SUM_LOGS/$MOD_V_SNAME-$VERSION
   done
 
 }
 
 create_install_cache() {
   debug_msg "create_install_cache($@)"
-  MOD_SNAME=$(echo $MODULE | sed 's:/:.:g')
+ mv_edit( $MODULE )
 
   if [ "$ARCHIVE" == "off" ] ; then
     return
   fi
 
-  message "${MESSAGE_COLOR}Creating ${FILE_COLOR}$INSTALL_CACHE/$MOD_SNAME-$VERSION-$BUILD.tar.bz2${DEFAULT_COLOR}"
-  tar cPjf "$INSTALL_CACHE/$MOD_SNAME-$VERSION-$BUILD.tar.bz2" --no-recursion -T $INSTALL_LOGS/$MOD_SNAME-$VERSION
+  message "${MESSAGE_COLOR}Creating ${FILE_COLOR}$INSTALL_CACHE/$MOD_V_SNAME-$VERSION-$BUILD.tar.bz2${DEFAULT_COLOR}"
+  tar cPjf "$INSTALL_CACHE/$MOD_V_SNAME-$VERSION-$BUILD.tar.bz2" --no-recursion -T $INSTALL_LOGS/$MOD_V_SNAME-$VERSION
 
 }
 




More information about the Lunar-commits mailing list