Added more verbose error messages when downloading packages
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
# 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
# Load stage number definition
source ./stage.def
+if [ -z "${LFS_STAGE}" ]; then
+ echo "LFS_STAGE is undefined (see stage.def)"
+ return ${EXIT_FAILURE}
+fi
+
+if [ "x${LFS_STAGE}" != "xstage0" -a "x${LFS_STAGE}" != "xstage1" ]; then
+ LFS=""
+fi
+
+CLFS=${LFS}
+
# Load functions
source ../functions/fpkg
source ../functions/lpkg
export CLFS_BUILDFLAGS CLFS_TARGET CLFS_ARCH CLFS_HOST CLFS_ENDIAN CLFS_NOT_ENDIAN
-if [ -z "${LFS_STAGE}" ]; then
- echo "LFS_STAGE is undefined (see stage.def)"
- return ${EXIT_FAILURE}
-fi
-
-if [ "x${LFS_STAGE}" != "xstage0" -a "x${LFS_STAGE}" != "xstage1" ]; then
- LFS=""
-fi
-
-CLFS=${LFS}
-
test_presence_of_packages_directory()
{
if [ ! -d "$(dirname $(pwd))/packages" ]; then