From 83e6cd311887c77c34b40c30966e957b77bab3b9 Mon Sep 17 00:00:00 2001 From: "gobo72@gmail.com" Date: Sat, 11 Aug 2012 19:31:44 +0000 Subject: [PATCH] =?utf8?q?Correction=20probl=C3=A8me=20avec=20fetch=20patc?= =?utf8?q?h=20quand=20le=20nom=20de=20la=20patch=20a=20un=20suffixe=20comp?= =?utf8?q?renant=20le=20nomd'un=20autre=20package.=20Ex:=20Mesa-8.0.4-llvm?= =?utf8?q?-3.1-fix.patch?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- functions/fpkg | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/functions/fpkg b/functions/fpkg index 0729e78..296bad8 100644 --- a/functions/fpkg +++ b/functions/fpkg @@ -228,16 +228,24 @@ static_checkpatch() # Remplace les "+" par "%2B" local PACK_URL=$(echo $PACK | sed s!\+!%2B!g) - local PATCHES_FOUND=$(cat ${PATCHES_LIST} | grep "${PACK_URL}-" | sed "s/.*\(${PACK_URL}-.*\.patch\).*/\1/") + # Patches list formats (patches-list-*.html): + # LFS: a href="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}-" | \ + sed "s/.*\(${PACK_URL}-.*\.patch\)\".*/\1/") + if [ -n "${PATCHES_FOUND}" ]; then for p in ${PATCHES_FOUND}; do # Remplace les "%2B" par "+" PATCH_NAME=$(echo ${p} | sed s!%2B!\+!g) if [ ! -f ${LFS_PKG_DIR}/${PATCH_NAME} ]; then - # String uses $PATCH_NAME and not $p ??? - #####rcmd "Fetching ${PATCH_NAME} from ${PATCHES_URL}" wget_wrapper ${PATCHES_URL} ${p} ${FTYPE_OTHER} - wget_wrapper ${PATCHES_URL} ${p} + wget_wrapper ${PATCHES_URL} ${PATCH_NAME} fi done fi -- 2.20.1