CVS: theedge/var/lib/lunar/functions build.lunar, 1.4, 1.5 install.lunar, 1.6, 1.7 sources.lunar, 1.9, 1.10

sofar at lunar-linux.org sofar at lunar-linux.org
Wed Jul 23 22:54:18 GMT 2003


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

Modified Files:
	build.lunar install.lunar sources.lunar 
Log Message:
Fixing a bug that niki spotted, propagation of error result now comes from missing downloads down to lin_module, which exists before optimize now too. General order in pre-build stage improved too. Moving verify_source code out of build into sources.lunar.


Index: build.lunar
===================================================================
RCS file: /var/cvs/lunar/theedge/var/lib/lunar/functions/build.lunar,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- build.lunar	17 Jul 2003 20:19:17 -0000	1.4
+++ build.lunar	23 Jul 2003 22:54:16 -0000	1.5
@@ -629,28 +629,3 @@
 ) }
 
 
-verify_source() {
-
-  VERIFIED="true"
-
-  for  SOURCE_FILE  in  $@;  do
-    if  !  guess_filename  $SOURCE_CACHE/$1  >/dev/null
-    then
-      message  "${PROBLEM_COLOR}Missing ${FILE_COLOR}${1}${DEFAULT_COLOR}"
-      message  "${PROBLEM_COLOR}Lunar Install aborting.${DEFAULT_COLOR}"
-      activity_log  "lin"  "$MODULE"  "$VERSION"  "failed"  \
-                    "because it was missing source:  $1"
-      VERIFIED=false
-      break
-    fi
-  done
-
-  $VERIFIED
-}
-
-
-verify_sources() {
-  md5_verify_source `sources $MODULE MD5`
-}
-
-

Index: install.lunar
===================================================================
RCS file: /var/cvs/lunar/theedge/var/lib/lunar/functions/install.lunar,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- install.lunar	22 Jul 2003 21:01:30 -0000	1.6
+++ install.lunar	23 Jul 2003 22:54:16 -0000	1.7
@@ -106,8 +106,12 @@
     if [ -s $SCRIPT_DIRECTORY/PRE_BUILD ] ; then
       run_module_file $MODULE PRE_BUILD
     else
-      default_pre_build
+      if ! default_pre_build ; then
+        return 1
+      fi
     fi
+  else
+    return 1
   fi
 }
 
@@ -412,19 +416,22 @@
   run_conflicts               &&
   satisfy_depends             &&
   show_downloading            &&
- 
+
   # now entering the physical BUILD stage
   if ! current_locked && ! solo_locked ; then
-    echo $$ > $linING          &&
-    if ! [[ $CFLAGS ]] ; then
-      optimize
-    fi                         &&
-    start_logging
+    echo $$ > $linING  &&
+    start_logging  &&
 
     if ! run_pre_build ; then
       LIN_ERROR="PRE_BUILD"
     else
-      invoke_installwatch
+
+      # important stuff here!!!
+      invoke_installwatch &&
+      if ! [[ $CFLAGS ]] ; then
+        optimize
+      fi  &&
+      
       if ! run_build ; then
         LIN_ERROR="BUILD"
       else

Index: sources.lunar
===================================================================
RCS file: /var/cvs/lunar/theedge/var/lib/lunar/functions/sources.lunar,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- sources.lunar	17 Jul 2003 20:43:48 -0000	1.9
+++ sources.lunar	23 Jul 2003 22:54:16 -0000	1.10
@@ -6,7 +6,8 @@
 ############################################################
 #                                                          #
 # $FUNCTIONS/sources                                       #
-# includes sources, md5_verify_source                      #
+# includes sources, md5_verify_source, verify_sources      #
+# verify_source                                            #
 #                                                          #
 # 20020604                                                 #
 #                                                          #
@@ -17,9 +18,28 @@
 ############################################################
 
 
+verify_source() {
+  VERIFIED="true"
+  for SOURCE_FILE in $@ ; do
+    if ! guess_filename $SOURCE_CACHE/$1 >/dev/null ; then
+      message "${PROBLEM_COLOR}Missing ${FILE_COLOR}${1}${DEFAULT_COLOR}"
+      message "${PROBLEM_COLOR}Lunar Install aborting.${DEFAULT_COLOR}"
+      activity_log "lin" "$MODULE" "$VERSION" "failed" "because it was missing source:  $1"
+      return 1
+    fi
+  done
+}
+
+
+verify_sources() {
+  md5_verify_source $(sources $MODULE MD5)
+}
+
+
 # function : sources
-# usage    : sources <module_name> {MD5}
-# purpose  : displays the filenames and md5sums of sources for a given module
+# usage    : sources <module_name> {MD5|VFY|
+# purpose  : displays the filenames and md5sums or VFY part of sources
+#            for a given module
 sources() { (
   MAX_SOURCES=${MAX_SOURCES:=100}
 
@@ -37,6 +57,11 @@
       if [ -z "$SRC_MD5" ] ; then
         SRC_MD5=0
       fi
+    elif [ "$2" == "VFY" ] ; then
+      eval SRC_VFY=\$${TEMP}_VFY
+      if [ -z "$SRC_VFY" ] ; then
+        SRC_VFY=0
+      fi
     fi
 
     eval SRC2=\$SOURCE$((CNT+1))
@@ -46,6 +71,8 @@
       echo $SRC1
       if [ "$2" == "MD5" ] ; then
         echo $SRC_MD5
+      elif [ "$2" == "VFY" ] ; then
+        echo $SRC_VFY
       fi
     fi
 
@@ -92,16 +119,16 @@
 
 unpack() {
 
-    FILENAME=`guess_filename  $SOURCE_CACHE/$1`          &&
-  COMPRESSOR=`file  -b  $FILENAME  |  cut  -d ' '  -f1`  &&
+    FILENAME=$(guess_filename $SOURCE_CACHE/$1)
 
   verbose_msg "Unpacking \"$FILENAME\" in \"$(pwd)\""
 
-  case  $COMPRESSOR  in
-        bzip2)  bzip2  -cdf  $FILENAME  |  tar  -xf  -  ;;
-         gzip)  gzip   -cdf  $FILENAME  |  tar  -xf  -  ;;
-    compress*)  gzip   -cdf  $FILENAME  |  tar  -xf  -  ;;
-          Zip)  unzip  -q    $FILENAME                  ;;
+  case $(file -b $FILENAME | cut -d' ' -f1) in
+        bzip2)  tar jxf $FILENAME ;;
+         gzip)  tar zxf $FILENAME ;;
+	  tar)  tar xf $FILENAME ;;
+    compress*)  tar zxf $FILENAME ;;
+          Zip)  unzip -q $FILENAME ;;
           RPM)  rpmunpack  < $FILENAME  |  gzip  -d     \
                                         |  cpio  -idm   ;;
             *)  false                                   ;;




More information about the Lunar-commits mailing list