]> Untitled Git - hvlinux.git/commitdiff
Fixed bug in package-update log file base directory
authorHugo Villeneuve <hugo@hugovil.com>
Wed, 24 Apr 2013 14:37:50 +0000 (10:37 -0400)
committerHugo Villeneuve <hugo@hugovil.com>
Wed, 24 Apr 2013 14:37:50 +0000 (10:37 -0400)
Added more verbose error messages when downloading packages

functions/fpkg
functions/main

index e1427664f07fa8c683f5403c3312ca67bf967502..1fc6ec4e8b69054f3650c3c610eb95bb6417da4e 100644 (file)
@@ -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
index d8881684c4126bc7a6ce497c616035e1c496976f..ebdc9d8726ffdd8e250cf1092d88350a22d44f06 100644 (file)
@@ -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