Fix bug when retrieving some patches
authorHugo Villeneuve <hugo@hugovil.com>
Thu, 15 May 2014 23:52:44 +0000 (19:52 -0400)
committerHugo Villeneuve <hugo@hugovil.com>
Sat, 17 May 2014 18:17:38 +0000 (14:17 -0400)
Some patches are compressed (iana), and the script was catching
them even if they didn't finish in .patch (.patch.xz).

functions/fpkg

index 39717d1..dbbc838 100644 (file)
@@ -235,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