BLFS_XORG_URL="http://anduin.linuxfromscratch.org/files/BLFS/svn/xorg"
XORG_URL="http://xorg.freedesktop.org/releases/individual"
BLFS_XORG_URL="http://anduin.linuxfromscratch.org/files/BLFS/svn/xorg"
XORG_URL="http://xorg.freedesktop.org/releases/individual"
LFS_PATCHES_LIST=${LFS_PKG_DIR}/patches-list-lfs.html
BLFS_PATCHES_LIST=${LFS_PKG_DIR}/patches-list-blfs.html
LFS_PATCHES_LIST=${LFS_PKG_DIR}/patches-list-lfs.html
BLFS_PATCHES_LIST=${LFS_PKG_DIR}/patches-list-blfs.html
- local PATCHES_FOUND=$(cat ${PATCHES_LIST} | grep "${PACK}-" | sed "s/.*\(${PACK}-.*\.patch\).*/\1/")
+ # 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/")
- if [ ! -f ${LFS_PKG_DIR}/${p} ]; then
- rcmd "Fetching ${p} from ${PATCHES_URL}" ${WGETCMD} ${PATCHES_URL}/${p}
+ # Remplace les "%2B" par "+"
+ PATCH_NAME=$(echo ${p} | sed s!%2B!\+!g)
+
+ if [ ! -f ${LFS_PKG_DIR}/${PATCH_NAME} ]; then
+ rcmd "Fetching ${PATCH_NAME} from ${PATCHES_URL}" ${WGETCMD} ${PATCHES_URL}/${p}
for arch_ext in ${MY_ARCH_EXT}; do
# Don't take any chance: remove any partially downloaded file.
# If we arrive here, it means the final destination file was not found
# so we can safely remove any file prior to trying to download it.
rm -f ${LFS_PKG_DIR}/${PACK}.${arch_ext}
for arch_ext in ${MY_ARCH_EXT}; do
# Don't take any chance: remove any partially downloaded file.
# If we arrive here, it means the final destination file was not found
# so we can safely remove any file prior to trying to download it.
rm -f ${LFS_PKG_DIR}/${PACK}.${arch_ext}
- # Failure: if it was a connection timeout, don't try for other file extensions.
+ # Append log to global log file
+ cat ${WGET_LOG_FILE} >> ${LFS_LOG_FILE}
+
+ # Failure: if it was a connection timeout, don't try for other file
+ # extensions.
if grep "failed: Connection timed out" ${WGET_LOG_FILE} 1> /dev/null 2>&1; then
echo "Error, wget reported: Connection timed out"
return 1
fi
if detect_file_not_found; then
if grep "failed: Connection timed out" ${WGET_LOG_FILE} 1> /dev/null 2>&1; then
echo "Error, wget reported: Connection timed out"
return 1
fi
if detect_file_not_found; then
- # If we arrive here, it means we were able to successfully download the file.
- if [ "x${arch_ext}" = "xtar.gz" -o "x${arch_ext}" = "xtgz" -o "x${arch_ext}" = "xtar.Z" ]; then
+ # If we are here, it means the file was successfully downloaded.
+ if [ "x${arch_ext}" = "xtar.gz" -o "x${arch_ext}" = "xtgz" \
+ -o "x${arch_ext}" = "xtar.Z" ]; then
if [ -z "${FILE_EXT}" -o \
"x${FILE_EXT}" = "xtar.gz" -o \
"x${FILE_EXT}" = "xtgz" -o \
if [ -z "${FILE_EXT}" -o \
"x${FILE_EXT}" = "xtar.gz" -o \
"x${FILE_EXT}" = "xtgz" -o \
# Move file if source filename is not equal to package name and/or destination
# directory is not the default:
# Move file if source filename is not equal to package name and/or destination
# directory is not the default:
- # Check for available patches with SRC_FILENAME name.
- static_getpatch ${SRC_FILENAME}
+ if [ ${SRC_FILENAME} != ${PACK} ]; then
+ # Check for available patches with SRC_FILENAME name.
+ static_getpatch ${SRC_FILENAME}
- # Rename any patch fetched (in fpkg call) and replace SOURCE by TARGET in
- # patch name.
- if ls ${LFS_PKG_DIR}/${SRC_FILENAME}-*.patch 1> /dev/null 2>&1; then
- rename ${SRC_FILENAME} ${PACK} ${LFS_PKG_DIR}/${SRC_FILENAME}-*.patch
+ # Rename any patch fetched (in fpkg call) and replace SOURCE by TARGET
+ # in patch name.
+ if ls ${LFS_PKG_DIR}/${SRC_FILENAME}-*.patch 1> /dev/null 2>&1; then
+ echo "CMD=${SRC_FILENAME} ${PACK} ${LFS_PKG_DIR}/${SRC_FILENAME}-*.patch"
+ rename ${SRC_FILENAME} ${PACK} ${LFS_PKG_DIR}/${SRC_FILENAME}-*.patch
+ fi