Plus besoin du script setclock car le kernel lit automatiquement la valeur du rtc...
[hvlinux.git] / functions / main
index c8d2356..39c7d29 100644 (file)
@@ -2,6 +2,10 @@
 set -o errtrace # Let shell functions inherit ERR trap.
 set -o errexit
 
+# Don' t locate and remember (hash) commands as they are looked up for
+# execution (don' t remember path):
+set +h
+
 hvtrap_setup()
 {
     # Setting ERR trap does implicit `set -o errexit'.
@@ -796,6 +800,7 @@ indicate_pkg_build_complete()
 # Arg. #1: Package name and version (ex: gcc-4.5.1)
 # Remaining arguments: Additional configure options
 # Options:
+#   -c     Do not decompress package to ${LFS_TMP}
 #   -j     Disable parallel make for this package
 #   -l     Unique identification label in 'install.log'
 #          (default is package name and version)
@@ -812,15 +817,21 @@ ipkg()
     START_TIME=$(echo `date +%s`)
 
     unset ALT_SCRIPT_NAME
+
+    export DECOMPRESS="1"
     export IPKG_MODE="ac" # Default mode if not specified
     export HVLABEL="" # Global variable
 
     local HVMAKE_ORIG=${HVMAKE}
 
-    while getopts "jl:m:s:" flag ;do
+    while getopts "cjl:m:s:" flag ;do
         case ${flag} in
+            c)
+                # Do not decompress package
+                DECOMPRESS="0"
+                ;;
             j)
-                # Disable parallel make onlyfor this package
+                # Disable parallel make only for this package
                 HVMAKE="make"
                 ;;
            l)
@@ -908,6 +919,12 @@ ipkg()
     # Make sure we are at a known location
     cd ${SCRDIR}
 
+    if [ "x${LFS_STAGE}" != "xstage0" -a "x${LFS_STAGE}" != "xstage1" ]; then
+       # Make sure to update dynamic linker run-time bindings, except for
+       # stages 0 and 1 where we run as the LFS user.
+       ldconfig
+    fi
+
     exec 1>&6 # Restore stdout.
 
     # Displaying build time after the package name.
@@ -921,9 +938,6 @@ ipkg()
 
     ipkg_trap_end
 
-    # Make sure to update dynamic linker run-time bindings
-    ldconfig
-
     return $EXIT_SUCCESS
 }