Author: pierre
Date: Fri May  1 07:24:32 2020
New Revision: 4157

Log:
Add code to save work at the end of chapter 5
(and finish the rebuild-makefile change)

Modified:
   jhalfs/trunk/Config.in
   jhalfs/trunk/LFS/master.sh
   jhalfs/trunk/common/libs/func_compare.sh
   jhalfs/trunk/common/libs/func_validate_configs.sh
   jhalfs/trunk/jhalfs

Modified: jhalfs/trunk/Config.in
==============================================================================
--- jhalfs/trunk/Config.in      Fri May  1 07:20:45 2020        (r4156)
+++ jhalfs/trunk/Config.in      Fri May  1 07:24:32 2020        (r4157)
@@ -1077,12 +1077,23 @@
 endmenu        #--- System configuration
 
 menu "Advanced Features"
-depends on !BOOK_BLFS
+depends on !BOOK_BLFS && !REBUILD_MAKEFILE
 
     config    REPORT
         bool "Create SBU and disk usage report"
         default y
 
+    config    SAVE_CH5
+        bool "Save Chapter 5 work"
+        depends on BOOK_LFS || BOOK_LFS_SYSD
+        default n
+        help
+            Save the state of jhalfs at the end of chapter 5:
+            
+            if you tick this item, the whole $LFS directory is
+            saved when chapter 5 is finished. It'll be in an xz
+            compressed tarball in the $LFS/jhalfs directory
+
     #--- ICA
     config    COMPARE
         bool "Run comparison analysis on final stage"

Modified: jhalfs/trunk/LFS/master.sh
==============================================================================
--- jhalfs/trunk/LFS/master.sh  Fri May  1 07:20:45 2020        (r4156)
+++ jhalfs/trunk/LFS/master.sh  Fri May  1 07:24:32 2020        (r4157)
@@ -100,7 +100,7 @@
 # Initialize the Makefile target: it'll change during chapter
 # For vanilla lfs, the "changingowner" script should be run as root. So
 # it belongs to the "SUDO" target, with list in the "runasroot" variable.
-# For new lfs, changingowner and kernfs are in "runsaroot", then the following,
+# For new lfs, changingowner and kernfs are in "runasroot", then the following,
 # starting at creatingdirs, are in the "CHROOT" target, in variable "chapter6".
 # Makefile_target records the variable, not really the target!
 # We use a case statement on that variable, because instructions in the
@@ -441,6 +441,8 @@
 
   chapter4_Makefiles
   chapter5_Makefiles
+  # Add the save target, if needed
+  [[ "$SAVE_CH5" = "y" ]] && wrt_save_target $Makefile_target
   chapter6_Makefiles
   # Add the iterations targets, if needed
   [[ "$COMPARE" = "y" ]] && wrt_compare_targets

Modified: jhalfs/trunk/common/libs/func_compare.sh
==============================================================================
--- jhalfs/trunk/common/libs/func_compare.sh    Fri May  1 07:20:45 2020        
(r4156)
+++ jhalfs/trunk/common/libs/func_compare.sh    Fri May  1 07:24:32 2020        
(r4157)
@@ -53,7 +53,7 @@
   local ITERATION=$1
   local   PREV_IT=$2
   local PRUNEPATH="/dev /home /${SCRIPT_ROOT} /lost+found /media /mnt /opt 
/proc \
-/sources /root /srv /sys /tmp /tools /usr/local /usr/src"
+/sources /root /run /srv /sys /tmp /tools /usr/local /usr/src /var"
 
   local    ROOT_DIR=/
   local DEST_TOPDIR=/${SCRIPT_ROOT}

Modified: jhalfs/trunk/common/libs/func_validate_configs.sh
==============================================================================
--- jhalfs/trunk/common/libs/func_validate_configs.sh   Fri May  1 07:20:45 
2020        (r4156)
+++ jhalfs/trunk/common/libs/func_validate_configs.sh   Fri May  1 07:24:32 
2020        (r4157)
@@ -51,7 +51,7 @@
   local -r LFS_system="HOSTNAME INTERFACE IP_ADDR GATEWAY PREFIX BROADCAST 
DOMAIN DNS1 DNS2 FONT KEYMAP LOCAL LOG_LEVEL"
 
   # Full list of books settings
-  local -r   lfs_PARAM_LIST="$LFS_book   $GENERAL_common $LFS_build 
$LFS_system  $ADVANCED_chroot REALSBU $ADVANCED_common"
+  local -r   lfs_PARAM_LIST="$LFS_book   $GENERAL_common $LFS_build 
$LFS_system  $ADVANCED_chroot REALSBU SAVE_CH5 $ADVANCED_common"
   local -r  hlfs_PARAM_LIST="$HLFS_book  $GENERAL_common $HLFS_build  
$ADVANCED_chroot $ADVANCED_common"
   local -r  clfs_PARAM_LIST="$CLFS_book  $GENERAL_common $CLFS_build  
$ADVANCED_chroot $ADVANCED_common"
   local -r clfs2_PARAM_LIST="$CLFS2_book $GENERAL_common $CLFS2_build          
        $ADVANCED_common"

Modified: jhalfs/trunk/jhalfs
==============================================================================
--- jhalfs/trunk/jhalfs Fri May  1 07:20:45 2020        (r4156)
+++ jhalfs/trunk/jhalfs Fri May  1 07:24:32 2020        (r4157)
@@ -178,6 +178,7 @@
 UNICODE=${UNICODE:=n}
 LOCAL=${LOCAL:=n}
 REALSBU=${REALSBU:=n}
+SAVE_CH5=${SAVE_CH5:=n}
 
 if [[ "${NO_PROGRESS_BAR}" = "y" ]] ; then
 # shellcheck disable=SC2034
@@ -354,6 +355,11 @@
   load_file "${COMMON_DIR}/libs/func_compare.sh" 'Loading compare module'
 fi
 #
+# save module
+if [[ "$SAVE_CH5" = "y" ]]; then
+  load_file "${COMMON_DIR}/libs/func_save.sh" 'Loading save module'
+fi
+#
 # optimize module
 if [[ "$OPTIMIZE" != "0" ]]; then
   load_file optimize/optimize_functions 'Loading optimization module'
-- 
http://lists.linuxfromscratch.org/listinfo/alfs-log
Unsubscribe: See the above information page

Reply via email to