CVS: theedge/var/lib/lunar/functions download.lunar, 1.19, 1.20 edit.lunar, 1.4, 1.5 install.lunar, 1.4, 1.5 sources.lunar, 1.8, 1.9 useradd.lunar, 1.1, 1.2

sofar at lunar-linux.org sofar at lunar-linux.org
Thu Jul 17 20:43:50 GMT 2003


Update of /var/cvs/lunar/theedge/var/lib/lunar/functions
In directory dbguin.lunar-linux.org:/tmp/cvs-serv8467/var/lib/lunar/functions

Modified Files:
	download.lunar edit.lunar install.lunar sources.lunar 
	useradd.lunar 
Log Message:
Fixed some error messages (trying to uniformize them) and a fix for a broken download (unpack() croaking) error that resulted in unpack not logging the broken lin to activity log.


Index: download.lunar
===================================================================
RCS file: /var/cvs/lunar/theedge/var/lib/lunar/functions/download.lunar,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- download.lunar	13 Jul 2003 21:57:44 -0000	1.19
+++ download.lunar	17 Jul 2003 20:43:48 -0000	1.20
@@ -35,7 +35,7 @@
 
 get_svn() {(
   if ! module_installed subversion ; then
-    message "${PROBLEM_COLOR}Cannot fetch SVN sources without \"subversion\" installed!${DEFAULT_COLOR}"
+    message "${PROBLEM_COLOR}! Cannot fetch SVN sources without \"subversion\" installed${DEFAULT_COLOR}"
     exit 1
   fi
 
@@ -96,7 +96,7 @@
 
 get_cvs() {(
   if ! module_installed cvs ; then
-    message "${PROBLEM_COLOR}Cannot fetch CVS sources without \"cvs\" installed!${DEFAULT_COLOR}"
+    message "${PROBLEM_COLOR}! Cannot fetch CVS sources without \"cvs\" installed!${DEFAULT_COLOR}"
     exit 1
   fi
 

Index: edit.lunar
===================================================================
RCS file: /var/cvs/lunar/theedge/var/lib/lunar/functions/edit.lunar,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- edit.lunar	7 Apr 2003 20:51:32 -0000	1.4
+++ edit.lunar	17 Jul 2003 20:43:48 -0000	1.5
@@ -48,7 +48,7 @@
     fi
   fi
 
-  message "${PROBLEM_COLOR}Broken patch file \"$1\"!${DEFAULT_COLOR}"
+  message "${PROBLEM_COLOR}! Broken patch file ${DEFAULT_COLOR}${FILE_COLOR}$1${DEFAULT_COLOR}"
   rm -f $TMPFILE1 $TMPFILE2
   return -1
 }

Index: install.lunar
===================================================================
RCS file: /var/cvs/lunar/theedge/var/lib/lunar/functions/install.lunar,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- install.lunar	17 Jul 2003 20:19:17 -0000	1.4
+++ install.lunar	17 Jul 2003 20:43:48 -0000	1.5
@@ -48,9 +48,7 @@
   if [[ -f /var/state/lunar/blacklist.$PLATFORM ]]; then
     BLKLST=`grep ^$MODULE$ /var/state/lunar/blacklist.$PLATFORM`
     if [[ $BLKLST == $MODULE ]]; then
-      message "${PROBLEM_COLOR}" \
-              "Module $MODULE is blacklisted and will not be installed." \
-	      "${DEFAULT_COLOR}"
+      message "${PROBLEM_COLOR}! Module ${DEFAULT_COLOR}${MODULE_COLOR}$MODULE${DEFAULT_COLOR}${PROBLEM_COLOR} is blacklisted and will not be installed${DEFAULT_COLOR}"
       exit 0
     fi
   else
@@ -444,7 +442,7 @@
         temp_destroy $INSTALLWATCHFILE
       fi
       sound FAILURE
-      message "${PROBLEM_COLOR}! Problem detected during \"$LIN_ERROR\" !${DEFAULT_COLOR}"
+      message "${PROBLEM_COLOR}! Problem detected during ${FILE_COLOR}$LIN_ERROR${DEFAULT_COLOR}"
       rm -f $linING
       report $COMPILE_LOGS/$MODULE-$VERSION.bz2 "compile log" $MODULE $VERSION
       activity_log  "lin"  "$MODULE"  "$VERSION"  "failed" "Due to build errors during $LIN_ERROR"
@@ -465,7 +463,7 @@
 
     if [ -n "$LIN_ERROR" ] ; then
       sound FAILURE
-      message "${PROBLEM_COLOR}! Problem detected during \"$LIN_ERROR\" !${DEFAULT_COLOR}"
+      message "${PROBLEM_COLOR}! Problem detected during ${FILE_COLOR}$LIN_ERROR${DEFAULT_COLOR}"
       rm -f $linING
       report $COMPILE_LOGS/$MODULE-$VERSION.bz2 "compile log" $MODULE $VERSION
       activity_log  "lin"  "$MODULE"  "$VERSION"  "failed" "Due to build errors during $LIN_ERROR"
@@ -480,7 +478,7 @@
 
     if [ "$?" != 0 ] ; then
       sound FAILURE
-      message "${PROBLEM_COLOR}! Problem detected !${DEFAULT_COLOR}"
+      message "${PROBLEM_COLOR}! Problem detected${DEFAULT_COLOR}"
       rm -f $linING
       report $COMPILE_LOGS/$MODULE-$VERSION.bz2 "compile log" $MODULE $VERSION
       activity_log  "lin"  "$MODULE"  "$VERSION"  "failed" "Due to build errors during or after $LIN_ERROR"
@@ -513,10 +511,8 @@
 
 current_locked() {
   if  lin_locked  $MODULE;  then
-    message  "${PROBLEM_COLOR}Detected lin lock file:"  \
-             "${FILE_COLOR}${linING}${DEFAULT_COLOR}"
-    message  "Now waiting for ${MODULE_COLOR}${MODULE}${DEFAULT_COLOR}"  \
-             "to finish installing or for the lock to clear."
+    message  "${QUERY_COLOR}Detected lin lock file: ${FILE_COLOR}${linING}${MESSAE_COLOR}"
+    message  "${MESSAGE_COLOR}Now waiting for ${MODULE_COLOR}${MODULE}${DEFAULTT_COLOR}${MESSAGE_COLOR}to finish installing or for the lock to clear."
 
     while  lin_locked  $MODULE;  do  sleep  2;  done
     false

Index: sources.lunar
===================================================================
RCS file: /var/cvs/lunar/theedge/var/lib/lunar/functions/sources.lunar,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- sources.lunar	13 Jul 2003 20:49:54 -0000	1.8
+++ sources.lunar	17 Jul 2003 20:43:48 -0000	1.9
@@ -76,13 +76,11 @@
     fi
       
     if [ "$TEMP" != "$2" ] ; then 
-       message  "${PROBLEM_COLOR}Wrong md5 sum for ${FILE_COLOR}${1}" \
-                 "${DEFAULT_COLOR}"
-       message  "${PROBLEM_COLOR}Removing ${FILE_COLOR}${SOURCE_CACHE}/${1}" \
-                "${DEFAULT_COLOR}"
+       message  "${PROBLEM_COLOR}! Wrong md5 sum for ${FILE_COLOR}${1}${DEFAULT_COLOR}"
+       message  "${PROBLEM_COLOR}Removing ${FILE_COLOR}${SOURCE_CACHE}/${1}${DEFAULT_COLOR}"
        rm -f $SOURCE_CACHE/$1 2>/dev/null                             &&
-       message  "${FILE_COLOR}Removed!!${DEFAULT_COLOR}"              ||
-       message  "${PROBLEM_COLOR}Unable to remove!!${DEFAULT_COLOR}" 
+       message  "${FILE_COLOR}Removed${DEFAULT_COLOR}"              ||
+       message  "${PROBLEM_COLOR}Unable to remove${DEFAULT_COLOR}" 
        ALL_OK=false
     fi
 
@@ -110,14 +108,14 @@
   esac
 
   if [ $? != 0 ] ; then
-    message "${PROBLEM_COLOR}Error while unpacking \"$1\", aborting $0!${DEFAULT_COLOR}"
-    exit 1
+    message "${PROBLEM_COLOR}! Error while unpacking ${FILE_COLOR}$SOURCE_CACHE/$1${DEFAULT_COLOR}${PROBLEM_COLOR}${DEFAULT_COLOR}"
+    return 1
   fi
   
   [ -n "$SOURCE_DIRECTORY" ] &&
   [ -d "$SOURCE_DIRECTORY" ]
   
-  if [[ `echo $CFLAGS | grep fbranch-probabilities` ]]; then
+  if [[ $(echo $CFLAGS | grep fbranch-probabilities) ]]; then
     chown -R 777 $SOURCE_DIRECTORY 2>&1 >/dev/null
   else
     chown -R root:root $SOURCE_DIRECTORY 2>&1 >/dev/null 

Index: useradd.lunar
===================================================================
RCS file: /var/cvs/lunar/theedge/var/lib/lunar/functions/useradd.lunar,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- useradd.lunar	6 Mar 2003 22:44:20 -0000	1.1
+++ useradd.lunar	17 Jul 2003 20:43:48 -0000	1.2
@@ -25,12 +25,12 @@
   GROUPNAME=$(echo $1 | cut -d: -f2)
 
   if [ -z "$USERNAME" ] ; then
-    message "${PROBLEM_COLOR}add_priv_user: no username specified${DEFAULT_COLOR}"
+    message "${PROBLEM_COLOR}!add_priv_user: no username specified${DEFAULT_COLOR}"
     exit 1
   fi
 
   if [ -z "$GROUPNAME" ] ; then
-    message "${PROBLEM_COLOR}add_priv_user: no groupname specified${DEFAULT_COLOR}"
+    message "${PROBLEM_COLOR}!add_priv_user: no groupname specified${DEFAULT_COLOR}"
     exit 1
   fi
 
@@ -48,7 +48,7 @@
 	fi
       done
       if [ "$N" == "100" ] ; then
-        message "${PROBLEM_COLOR}add_priv_user: no more group id's left under gid=100, bailing out!${DEFAULT_COLOR}"
+        message "${PROBLEM_COLOR}!add_priv_user: no more group id's left under gid=100, bailing out!${DEFAULT_COLOR}"
 	exit 1
       fi
       verbose_msg "creating group \"$GROUPNAME\" with id=\"$N\""
@@ -63,7 +63,7 @@
       fi
     done
     if [ "$N" == "100" ] ; then
-      message "${PROBLEM_COLOR}add_priv_user: no more user id's left under uid=100, bailing out!${DEFAULT_COLOR}"
+      message "${PROBLEM_COLOR}!add_priv_user: no more user id's left under uid=100, bailing out!${DEFAULT_COLOR}"
       exit 1
     fi
     




More information about the Lunar-commits mailing list