X-Git-Url: http://gitweb.hugovil.com/?a=blobdiff_plain;f=functions%2Ffpkg;h=dbbc838dbbe678c8ca6bf97a27cb379ee4c3fc69;hb=02a6c67738080f06def83e5c2aad68af3ce2d56b;hp=e1427664f07fa8c683f5403c3312ca67bf967502;hpb=a499ee54f561336f069a7f664a11c4970c9248bc;p=hvlinux.git diff --git a/functions/fpkg b/functions/fpkg index e142766..dbbc838 100644 --- a/functions/fpkg +++ b/functions/fpkg @@ -16,6 +16,8 @@ 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 +PATCHES_BLACKLIST=../config/patches.blacklist + # Test if the given file extension correspond to a compressed archive # Arg. #1: File extension is_extension_archive() @@ -125,6 +127,8 @@ wget_wrapper() fi if [ ${wget_status} -ne 0 ]; then + echo "Error: wget returned error status ${wget_status}" >> \ + ${LFS_LOG_FILE} remove_partial_file ${LFS_PKG_DIR}/${SOURCE} return 1 fi @@ -134,6 +138,7 @@ wget_wrapper() # Just to be sure, test if downloaded file is really an archive: if ! is_archive ${LFS_PKG_DIR}/${SOURCE}.part; then # Partial failure if file is invalid. + echo "Error: failed archive test" >> ${LFS_LOG_FILE} remove_partial_file ${LFS_PKG_DIR}/${SOURCE} return 2 fi @@ -230,13 +235,14 @@ static_checkpatch() # Patches list formats (patches-list-*.html): # LFS: a href="name.patch" - # hugovil: A HREF "dir/subdir/subdir/name.patch + # hugovil: a href="dir/subdir/subdir/name.patch" # We must search for a patch beginning with either a slash or a " to avoid # the possibility of having another package name within a patch name: # if patch = Mesalib-8.0.4-llvm-3.1-fixes-1.patch # then we could erroneously try to download patch "llvm-3.1-fixes-1.patch" local PATCHES_FOUND=$(cat ${PATCHES_LIST} | \ egrep "\"${PACK_URL}-|/${PACK_URL}-" | \ + egrep ".patch\"" | \ sed "s/.*\(${PACK_URL}-.*\.patch\)\".*/\1/") if [ -n "${PATCHES_FOUND}" ]; then @@ -245,7 +251,15 @@ static_checkpatch() PATCH_NAME=$(echo ${p} | sed s!%2B!\+!g) if [ ! -f ${LFS_PKG_DIR}/${PATCH_NAME} ]; then - wget_wrapper ${PATCHES_URL} ${PATCH_NAME} + # Fetch patch only if it is not blacklisted! + local BL=$(cat ${PATCHES_BLACKLIST} | \ + egrep "${PATCH_NAME}") + + if [ "x${BL}" == "x" ]; then + wget_wrapper ${PATCHES_URL} ${PATCH_NAME} + else + MSGSTRING="Patch ${PATCH_NAME} blacklisted" print_status warning + fi fi done fi