X-Git-Url: http://gitweb.hugovil.com/?a=blobdiff_plain;f=functions%2Ffpkg;h=e1427664f07fa8c683f5403c3312ca67bf967502;hb=131d3a522878352b702de2f1ce9a5d7462f16e04;hp=6a8bf4b13bbd587a0d7c06cc76ba20d5d2ba985f;hpb=50e0479441669b1be25b0097be3d10db0949f031;p=hvlinux.git diff --git a/functions/fpkg b/functions/fpkg index 6a8bf4b..e142766 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 @@ -476,7 +484,7 @@ fpkg() fi if [ -z "${FILE_EXT}" ]; then # Default file extension is tar.gz - FILE_EXT="tar.gz" + FILE_EXT="tar.xz" fi ;; gnome) @@ -486,6 +494,10 @@ fpkg() SRC_DIR=$(get_pkg_name ${PACK}) fi SRC_DIR="${SRC_DIR}/$(get_pkg_ver2 ${PACK})" + if [ -z "${FILE_EXT}" ]; then + # Default file extension is xz + FILE_EXT="tar.xz" + fi ;; sf) URL=${SOURCEFORGE_URL}