X-Git-Url: http://gitweb.hugovil.com/?a=blobdiff_plain;f=functions%2Ffpkg;h=1fc6ec4e8b69054f3650c3c610eb95bb6417da4e;hb=498549fb1b100f0649a8fcee8a5f5a0e0593369a;hp=0729e788d46f9a6f47bb3f8361da38b2d3ddf0b8;hpb=ccde14dbaf08463bb8ca62c98302c0da1a6f2b51;p=hvlinux.git diff --git a/functions/fpkg b/functions/fpkg index 0729e78..1fc6ec4 100644 --- a/functions/fpkg +++ b/functions/fpkg @@ -125,6 +125,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 +136,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 @@ -228,16 +231,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 +487,7 @@ fpkg() fi if [ -z "${FILE_EXT}" ]; then # Default file extension is tar.gz - FILE_EXT="tar.gz" + FILE_EXT="tar.xz" fi ;; gnome)