From: Hugo Villeneuve Date: Wed, 24 Apr 2013 14:37:50 +0000 (-0400) Subject: Fixed bug in package-update log file base directory X-Git-Url: http://gitweb.hugovil.com/?a=commitdiff_plain;h=498549fb1b100f0649a8fcee8a5f5a0e0593369a;p=hvlinux.git Fixed bug in package-update log file base directory Added more verbose error messages when downloading packages --- diff --git a/functions/fpkg b/functions/fpkg index e142766..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 diff --git a/functions/main b/functions/main index d888168..ebdc9d8 100644 --- a/functions/main +++ b/functions/main @@ -51,6 +51,17 @@ 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 @@ -117,17 +128,6 @@ CLFS_HOST="$(echo $MACHTYPE | \ 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