tarbz2: crée l'archive dans le répertoire courant
[hvlinux.git] / functions-update
index 8fa73a9..fd458f2 100644 (file)
@@ -19,7 +19,7 @@ GNOME_URL="http://ftp.gnome.org/pub/gnome/sources"
 GNU_URL="http://ftp.gnu.org/pub/gnu"
 TETEX_URL="http://www.tug.org/ftp/tex-archive/systems/unix/teTeX"
 
-WGETCMD="wget --directory-prefix=${LFS_PKG_DIR} --timeout=5 --tries=3 -o ${WGET_LOG_FILE}"
+WGETCMD="wget --directory-prefix=${LFS_PKG_DIR} --timeout=5 --tries=3 -nc -c -o ${WGET_LOG_FILE}"
 
 LFS_PATCHES_LIST=${LFS_PKG_DIR}/patches-list-lfs.html
 BLFS_PATCHES_LIST=${LFS_PKG_DIR}/patches-list-blfs.html
@@ -155,7 +155,7 @@ detect_file_not_found()
 {
     # HTTP: will return error code 404.
     # FTP: will say "File not found"
-    if grep "404 Not Found" ${WGET_LOG_FILE} 1> /dev/null 2>&1; then
+    if grep "404" ${WGET_LOG_FILE} 1> /dev/null 2>&1; then
         return 0
     elif grep "No such file" ${WGET_LOG_FILE} 1> /dev/null 2>&1; then
         return 0
@@ -189,6 +189,7 @@ static_getpkg()
     if detect_file_not_found; then
         # If file was not found, maybe a .tar.gz file exist...
        ${WGETCMD} ${URL}/${PACK}.tar.gz
+
        if [ ${?} -eq 0 ]; then
            gztobz2 ${LFS_PKG_DIR}/${PACK}.tar.gz || return 1
             return 0
@@ -402,14 +403,14 @@ lpkg()
 
     if [ ! -h ${LFS_PKG_DIR}/${FILE} ]; then
        # The link does not exist. First check if source file exist.
-       if [ ! -f ${LFS_PKG_BASE}/${SRCSTAGE}/${FILE} ]; then
-           echo "${FUNCNAME} ${*}"
-           echo "Missing source file..."
-           exit 1
-       fi
+       #if [ ! -f ${LFS_PKG_BASE}/${SRCSTAGE}/${FILE} ]; then
+       #    echo "${FUNCNAME} ${*}"
+       #    echo "Missing source file..."
+       #    return 1
+       #fi
 
        # Create link if it doesn't exist
-       ln -s ../${SRCSTAGE}/${FILE} ${LFS_PKG_DIR}/${FILE}
+       action_checkbox_time "Linking ${PACKAGE_NAME}" ln -s ../${SRCSTAGE}/${FILE} ${LFS_PKG_DIR}/${FILE}
     fi
 
     # Create link for patches corresponding to that package:
@@ -418,7 +419,7 @@ lpkg()
            PATCHFILE=$(basename ${patch})
            if [ ! -h ${LFS_PKG_DIR}/${PATCHFILE} ]; then
                # Create link if it doesn't exist
-               ln -s ../${SRCSTAGE}/${PATCHFILE} ${LFS_PKG_DIR}/${PATCHFILE}
+               action_checkbox_time "Linking ${PACKAGE_NAME}" ln -s ../${SRCSTAGE}/${PATCHFILE} ${LFS_PKG_DIR}/${PATCHFILE}
            fi
        done
     fi