r2344 - in jhalfs/branches/experimental: . common

georgeb at linuxfromscratch.org georgeb at linuxfromscratch.org
Wed Mar 15 13:50:40 PST 2006


Author: georgeb
Date: 2006-03-15 14:50:40 -0700 (Wed, 15 Mar 2006)
New Revision: 2344

Modified:
   jhalfs/branches/experimental/common/common-functions
   jhalfs/branches/experimental/common/config
   jhalfs/branches/experimental/common/func_check_version.sh
   jhalfs/branches/experimental/master.sh
Log:
Added test for tar >1.15, ability to fetch/store packages from/to a local archive.

Modified: jhalfs/branches/experimental/common/common-functions
===================================================================
--- jhalfs/branches/experimental/common/common-functions	2006-03-15 03:04:04 UTC (rev 2343)
+++ jhalfs/branches/experimental/common/common-functions	2006-03-15 21:50:40 UTC (rev 2344)
@@ -720,6 +720,16 @@
   # that don't conform to norms in the URL scheme.
   DIR=`echo $1 | sed 's at -doc@@;s at -linuxthreads@@;s at -libidn@@;s at -testsuite@@'`
 
+  # If the file exists in the archive copy it to the $BUILDDIR/sources dir
+  # MD5SUM is assumed to be correct from previous download 
+  if [ ! -z ${SRC_ARCHIVE} ] &&
+     [   -d ${SRC_ARCHIVE} ] &&
+     [   -f ${SRC_ARCHIVE}/$2 ]; then
+    cp ${SRC_ARCHIVE}/$2 .
+    echo "$2: -- ok"
+    return
+  fi
+
   # Find the md5 sum for this package.
   if [ $2 != MD5SUMS ] ; then
     set +e
@@ -753,6 +763,17 @@
   if [ $2 != MD5SUMS ] ; then
     echo `grep "$MD5" MD5SUMS` >> MD5SUMS-$VERSION
   fi
+
+  # If we make it this far we should copy the freshly downloaded file
+  # to the source archive. 
+  if [ ! -z ${SRC_ARCHIVE} ] &&
+     [   -d ${SRC_ARCHIVE} ] &&
+     [   -w ${SRC_ARCHIVE} ] &&
+     [ $2 != MD5SUMS ]; then
+       echo "Store file:<$2> in package archive"
+       cp -v $2 ${SRC_ARCHIVE}
+  fi
+
 }
 
 

Modified: jhalfs/branches/experimental/common/config
===================================================================
--- jhalfs/branches/experimental/common/config	2006-03-15 03:04:04 UTC (rev 2343)
+++ jhalfs/branches/experimental/common/config	2006-03-15 21:50:40 UTC (rev 2344)
@@ -11,6 +11,10 @@
 #--- Mount point for the build
 BUILDDIR=/mnt/SourceFiles
 
+#--- The local repository for packages/file
+#    Any downloaded files will be archived here 
+SRC_ARCHIVE=/mnt/SourceFiles/Source_Warehouse
+
 #--- Download the source packages 0(no)/1(yes)
 HPKG=0
 

Modified: jhalfs/branches/experimental/common/func_check_version.sh
===================================================================
--- jhalfs/branches/experimental/common/func_check_version.sh	2006-03-15 03:04:04 UTC (rev 2343)
+++ jhalfs/branches/experimental/common/func_check_version.sh	2006-03-15 21:50:40 UTC (rev 2344)
@@ -41,8 +41,8 @@
 		    This script requires ${ref_version} or greater\n"
      exit 1
   }
-  
-  echo -ne "$TXT:\t<${tst_version}>"
+
+  echo -ne "$TXT:\t${L_arrow}${BOLD}${tst_version}${OFF}${R_arrow}"
   IFS=".-("   # Split up w.x.y.z as well as w.x.y-rc  (catch release candidates)
   set -- $ref_version # set postional parameters to minimum ver values
   ref_major=$1; ref_minor=$2; ref_revision=$3

Modified: jhalfs/branches/experimental/master.sh
===================================================================
--- jhalfs/branches/experimental/master.sh	2006-03-15 03:04:04 UTC (rev 2343)
+++ jhalfs/branches/experimental/master.sh	2006-03-15 21:50:40 UTC (rev 2344)
@@ -262,6 +262,8 @@
 check_version "2.6.2" "`uname -r`"         "KERNEL"
 check_version "3.0"   "$BASH_VERSION"      "BASH"
 check_version "3.0"   "`gcc -dumpversion`" "GCC"
+tarVer=`tar --version`
+check_version "1.15.0" "${tarVer##* }"      "TAR"
 echo "---------------${nl_}"
 
 validate_config     1 # 0/1  0-do not display values




More information about the alfs-log mailing list