X-Git-Url: http://gitweb.hugovil.com/?a=blobdiff_plain;f=functions-update;h=de02b74fb2ed570049a83e6b1f241714ae6f7bd7;hb=3da8bc05d9f1e5a545f9337359d13d09cf1fb9a5;hp=8fa73a9ec9eb54651eccf3c8f84ba762490e5028;hpb=b2f91df3e7c1d1ca93ced97b5001e3134243666b;p=hvlinux.git diff --git a/functions-update b/functions-update index 8fa73a9..de02b74 100644 --- a/functions-update +++ b/functions-update @@ -8,21 +8,26 @@ WGET_LOG_FILE="${LFS_LOG_DIR}/pkg-wget.log" # URL LFS_BASE_URL="http://www.linuxfromscratch.org" +CLFS_BASE_URL="http://svn.cross-lfs.org/svn/repos/cross-lfs/trunk" +HV_BASE_URL="http://www.hugovil.com/hvlinux-repository" + LFS_PATCHES_URL="${LFS_BASE_URL}/patches/lfs/development" -LFS_PACKAGES_URL="ftp://ftp.osuosl.org/pub/lfs/lfs-packages/conglomeration" BLFS_PATCHES_URL="${LFS_BASE_URL}/patches/blfs/svn" -HV_BASE_URL="http://www.hugovil.com/hvlinux-repository" -HV_PACKAGES_URL="${HV_BASE_URL}/packages" +CLFS_PATCHES_URL="http://patches.cross-lfs.org/dev" HV_PATCHES_URL="${HV_BASE_URL}/patches" + +LFS_PACKAGES_URL="ftp://ftp.osuosl.org/pub/lfs/lfs-packages/conglomeration" +HV_PACKAGES_URL="${HV_BASE_URL}/packages" SOURCEFORGE_URL="http://internap.dl.sourceforge.net/sourceforge" 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 +CLFS_PATCHES_LIST=${LFS_PKG_DIR}/patches-list-clfs.html HV_PATCHES_LIST=${LFS_PKG_DIR}/patches-list-hv.html # Arg. #1: URL for patches repository. @@ -51,14 +56,16 @@ update_packages_init() fi # Getting list of all patches from LFS server. - ##action_checkbox "Fetching LFS patches list" - static_fetch_patches_list ${LFS_PATCHES_URL} ${LFS_PATCHES_LIST} + rcmd "Fetching LFS patches list" static_fetch_patches_list ${LFS_PATCHES_URL} ${LFS_PATCHES_LIST} # Getting list of all patches from BLFS server. - action_checkbox "Fetching BLFS patches list" static_fetch_patches_list ${BLFS_PATCHES_URL} ${BLFS_PATCHES_LIST} + rcmd "Fetching BLFS patches list" static_fetch_patches_list ${BLFS_PATCHES_URL} ${BLFS_PATCHES_LIST} + + # Getting list of all patches from CLFS server. + rcmd "Fetching CLFS patches list" static_fetch_patches_list ${CLFS_PATCHES_URL} ${CLFS_PATCHES_LIST} # Getting list of all patches from hugovil.com server. - action_checkbox "Fetching hugovil.com patches list" static_fetch_patches_list ${HV_PATCHES_URL} ${HV_PATCHES_LIST} + rcmd "Fetching hugovil.com patches list" static_fetch_patches_list ${HV_PATCHES_URL} ${HV_PATCHES_LIST} } # Get patch package if it is not in the repository @@ -75,7 +82,7 @@ static_checkpatch() if [ -n "${PATCHES_FOUND}" ]; then for p in ${PATCHES_FOUND}; do if [ ! -f ${LFS_PKG_DIR}/${p} ]; then - action_checkbox_time "Fetching ${p}" ${WGETCMD} ${PATCHES_URL}/${p} + rcmd "Fetching ${p} from ${PATCHES_URL}" ${WGETCMD} ${PATCHES_URL}/${p} fi done fi @@ -93,14 +100,25 @@ static_getpatch() return 1 fi - # Checking if patch is available from LFS. - static_checkpatch ${PACK} ${LFS_PATCHES_LIST} ${LFS_PATCHES_URL} + if [ -n "${USE_LFS_PATCHES}" ]; then + # Checking if patch is available from LFS. + static_checkpatch ${PACK} ${LFS_PATCHES_LIST} ${LFS_PATCHES_URL} + fi - # Checking if patch is available from BLFS. - static_checkpatch ${PACK} ${BLFS_PATCHES_LIST} ${BLFS_PATCHES_URL} + if [ -n "${USE_BLFS_PATCHES}" ]; then + # Checking if patch is available from BLFS. + static_checkpatch ${PACK} ${BLFS_PATCHES_LIST} ${BLFS_PATCHES_URL} + fi - # Checking if patch is available from hugovil.com. - static_checkpatch ${PACK} ${HV_PATCHES_LIST} ${HV_PATCHES_URL} + if [ -n "${USE_CLFS_PATCHES}" ]; then + # Checking if patch is available from CLFS. + static_checkpatch ${PACK} ${CLFS_PATCHES_LIST} ${CLFS_PATCHES_URL} + fi + + if [ -n "${USE_HV_PATCHES}" ]; then + # Checking if patch is available from hugovil.com. + static_checkpatch ${PACK} ${HV_PATCHES_LIST} ${HV_PATCHES_URL} + fi } # Convert multiple compressed gzip files to bzip2. @@ -155,7 +173,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 @@ -232,7 +250,7 @@ fpkg() fi if [ ! -f ${LFS_PKG_DIR}/${PACK}.tar.bz2 ]; then - action_checkbox_time "Fetching ${PACK}" static_getpkg ${PACK} ${URL} + rcmd "Fetching ${PACK}" static_getpkg ${PACK} ${URL} fi # Check if a patch is available. @@ -401,15 +419,15 @@ lpkg() fi if [ ! -h ${LFS_PKG_DIR}/${FILE} ]; then - # The link does not exist. First check if source file exist. + # Issue a warning if source file doesn't exist. if [ ! -f ${LFS_PKG_BASE}/${SRCSTAGE}/${FILE} ]; then - echo "${FUNCNAME} ${*}" - echo "Missing source file..." - exit 1 + source_link_status=" (missing source file)" + else + source_link_status="" fi # Create link if it doesn't exist - ln -s ../${SRCSTAGE}/${FILE} ${LFS_PKG_DIR}/${FILE} + rcmd "Linking ${PACKAGE_NAME}${source_link_status}" ln -s ../${SRCSTAGE}/${FILE} ${LFS_PKG_DIR}/${FILE} fi # Create link for patches corresponding to that package: @@ -418,7 +436,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} + rcmd "Linking ${PATCHFILE}" ln -s ../${SRCSTAGE}/${PATCHFILE} ${LFS_PKG_DIR}/${PATCHFILE} fi done fi