Add patches blacklist
authorHugo Villeneuve <hugo@hugovil.com>
Sat, 24 Aug 2013 03:27:40 +0000 (23:27 -0400)
committerHugo Villeneuve <hugo@hugovil.com>
Sat, 24 Aug 2013 03:33:55 +0000 (23:33 -0400)
config/patches.blacklist [new file with mode: 0644]
functions/fpkg

diff --git a/config/patches.blacklist b/config/patches.blacklist
new file mode 100644 (file)
index 0000000..56526f2
--- /dev/null
@@ -0,0 +1,3 @@
+# List of patches that must not be downloaded (one per line)
+
+make-3.82-upstream_fixes-3.patch
index 1fc6ec4..39717d1 100644 (file)
@@ -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()
@@ -248,7 +250,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