Added test for tar >1.15, ability to fetch/store packages from/to a local archive.
This commit is contained in:
parent
4bf0fc31f5
commit
e1edff3b92
4 changed files with 29 additions and 2 deletions
|
@ -720,6 +720,16 @@ download() { # Download file, write name to MISSING_FILES.DMP if
|
|||
# that don't conform to norms in the URL scheme.
|
||||
DIR=`echo $1 | sed 's@-doc@@;s@-linuxthreads@@;s@-libidn@@;s@-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 @@ download() { # Download file, write name to MISSING_FILES.DMP if
|
|||
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
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -11,6 +11,10 @@ declare -r LOG=000-masterscript.log
|
|||
#--- 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
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ inline_doc
|
|||
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
|
||||
|
|
|
@ -262,6 +262,8 @@ BOOK=${BOOK:=$PROGNAME-$LFSVRS}
|
|||
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
|
||||
|
|
Reference in a new issue