r2594 - in jhalfs/branches/experimental: CLFS common

manuel at linuxfromscratch.org manuel at linuxfromscratch.org
Sat Apr 29 07:16:06 PDT 2006


Author: manuel
Date: 2006-04-29 08:16:06 -0600 (Sat, 29 Apr 2006)
New Revision: 2594

Modified:
   jhalfs/branches/experimental/CLFS/master.sh
   jhalfs/branches/experimental/common/func_validate_configs.sh
Log:
Fixed a validatie_configs output bug.

Modified: jhalfs/branches/experimental/CLFS/master.sh
===================================================================
--- jhalfs/branches/experimental/CLFS/master.sh	2006-04-29 14:14:45 UTC (rev 2593)
+++ jhalfs/branches/experimental/CLFS/master.sh	2006-04-29 14:16:06 UTC (rev 2594)
@@ -461,22 +461,42 @@
 #-----------------------------#
 final_system_Makefiles() {    #
 #-----------------------------#
-  echo "${tab_}${GREEN}Processing... ${L_arrow}(chroot) final system${R_arrow}"
+  # Set envars and scripts for iteration targets
+  LOGS="" # Start with an empty global LOGS envar
+  if [[ -z "$1" ]] ; then
+    local N=""
+  else
+    local N=-build_$1
+    local basicsystem=""
+    mkdir final-system$N
+    cp final-system/* final-system$N
+    for script in final-system$N/* ; do
+      # Overwrite existing symlinks, files, and dirs
+      sed -e 's/ln -sv/&f/g' \
+          -e 's/mv -v/&f/g' \
+          -e 's/mkdir -v/&p/g' -i ${script}
+    done
+    # Remove Bzip2 binaries before make install
+    sed -e 's at make install at rm -vf /usr/bin/bz*\n&@' -i final-system$N/*-bzip2
+    # Fix how Module-Init-Tools do the install target
+    sed -e 's at make install at make INSTALL=install install@' -i final-system$N/*-module-init-tools
+    # Delete *old Readline libraries just after make install
+    sed -e 's at make install@&\nrm -v /lib/lib{history,readline}*old@' -i final-system$N/*-readline
+  fi
 
-  for file in final-system/* ; do
+  echo "${tab_}${GREEN}Processing... ${L_arrow}(chroot) final system$N${R_arrow}"
+
+  for file in final-system$N/* ; do
     # Keep the script file name
     this_script=`basename $file`
 
-    # Test if the stripping phase must be skipped
+    # Test if the stripping phase must be skipped.
+    # Skip alsp temp-perl for iterative runs
     case $this_script in
-      *stripping*) [[ "$STRIP" = "0" ]] && continue
-       ;;
+      *stripping*) [[ "$STRIP" = "0" ]] && continue ;;
+      *temp-perl*) [[ -n "$N" ]] && continue ;;
     esac
 
-    # First append each name of the script files to a list (this will become
-    # the names of the targets in the Makefile
-    basicsystem="$basicsystem $this_script"
-
     # Grab the name of the target, strip id number, XXX-script
     name=`echo $this_script | sed -e 's@[0-9]\{3\}-@@' \
                                   -e 's at temp-@@' \
@@ -485,22 +505,38 @@
                                   -e 's at 64@@' \
                                   -e 's at n32@@'`
 
+    # Find the version of the command files, if it corresponds with the building of
+    # a specific package. We need this here to can skip scripts not needed for
+    # iterations rebuilds
     vrs=`grep "^$name-version" $JHALFSDIR/packages | sed -e 's/.* //' -e 's/"//g'`
 
+    if [[ "$vrs" = "" ]] && [[ -n "$N" ]] ; then
+      case "${this_script}" in
+        *stripping*) ;;
+        *)  continue ;;
+      esac
+    fi
+
+    # Append each name of the script files to a list (this will become
+    # the names of the targets in the Makefile
+    basicsystem="$basicsystem ${this_script}${N}"
+
+    # Append each name of the script files to a list (this will become
+    # the names of the logs to be moved for each iteration)
+    LOGS="$LOGS ${this_script}"
+
     #--------------------------------------------------------------------#
     #         >>>>>>>> START BUILDING A Makefile ENTRY <<<<<<<<          #
     #--------------------------------------------------------------------#
     #
     # Drop in the name of the target on a new line, and the previous target
     # as a dependency. Also call the echo_message function.
-    wrt_target "${this_script}" "$PREV"
+    wrt_target "${this_script}${N}" "$PREV"
 
     # If $vrs isn't empty, we've got a package...
     if [ "$vrs" != "" ] ; then
-      case $name in
-        temp-perl) wrt_unpack2 "perl-$vrs.tar.*"    ;;
-        *)         wrt_unpack2 "$name-$vrs.tar.*"   ;;
-      esac
+      FILE="$name-$vrs.tar.*"
+      wrt_unpack2 "$FILE"
     fi
     #
     wrt_run_as_chroot1 "${this_script}" "${file}"
@@ -515,8 +551,9 @@
     #--------------------------------------------------------------------#
     #
     # Keep the script file name for Makefile dependencies.
-    PREV=$this_script
-
+    PREV=${this_script}${N}
+    # Set system_build envar for iteration targets
+    system_build=$basicsystem
   done  # for file in final-system/* ...
 }
 
@@ -524,25 +561,44 @@
 #-----------------------------#
 bm_final_system_Makefiles() { #
 #-----------------------------#
-  echo "${tab_}${GREEN}Processing... ${L_arrow}(boot) final system${R_arrow}"
+  # Set envars and scripts for iteration targets
+  LOGS="" # Start with an empty global LOGS envar
+  if [[ -z "$1" ]] ; then
+    local N=""
+    # The makesys phase was initiated in bm_testsuite_tools_makefile
+    [[ "$TEST" = 0 ]] && PREV=""
+  else
+    local N=-build_$1
+    local basicsystem=""
+    mkdir final-system$N
+    cp final-system/* final-system$N
+    for script in final-system$N/* ; do
+      # Overwrite existing symlinks, files, and dirs
+      sed -e 's/ln -sv/&f/g' \
+          -e 's/mv -v/&f/g' \
+          -e 's/mkdir -v/&p/g' -i ${script}
+    done
+    # Remove Bzip2 binaries before make install
+    sed -e 's at make install at rm -vf /usr/bin/bz*\n&@' -i final-system$N/*-bzip2
+    # Fix how Module-Init-Tools do the install target
+    sed -e 's at make install at make INSTALL=install install@' -i final-system$N/*-module-init-tools
+    # Delete *old Readline libraries just after make install
+    sed -e 's at make install@&\nrm -v /lib/lib{history,readline}*old@' -i final-system$N/*-readline
+  fi
 
-  # The makesys phase was initiated in bm_testsuite_tools_makefile
-  [[ "$TEST" = 0 ]] && PREV=""
+  echo "${tab_}${GREEN}Processing... ${L_arrow}(boot) final system$N${R_arrow}"
 
-  for file in final-system/* ; do
+  for file in final-system$N/* ; do
     # Keep the script file name
     this_script=`basename $file`
 
     # Test if the stripping phase must be skipped
+    # Skip alsp temp-perl for iterative runs
     case $this_script in
-      *stripping*) [[ "$STRIP" = "0" ]] && continue
-       ;;
+      *stripping*) [[ "$STRIP" = "0" ]] && continue ;;
+      *temp-perl*) [[ -n "$N" ]] && continue ;;
     esac
 
-    # First append each name of the script files to a list (this will become
-    # the names of the targets in the Makefile
-    basicsystem="$basicsystem $this_script"
-
     # Grab the name of the target, strip id number, XXX-script
     name=`echo $this_script | sed -e 's@[0-9]\{3\}-@@' \
                                   -e 's at temp-@@' \
@@ -551,22 +607,38 @@
                                   -e 's at 64@@' \
                                   -e 's at n32@@'`
 
+    # Find the version of the command files, if it corresponds with the building of
+    # a specific package. We need this here to can skip scripts not needed for
+    # iterations rebuilds
     vrs=`grep "^$name-version" $JHALFSDIR/packages | sed -e 's/.* //' -e 's/"//g'`
 
+    if [[ "$vrs" = "" ]] && [[ -n "$N" ]] ; then
+      case "${this_script}" in
+        *stripping*) ;;
+        *)  continue ;;
+      esac
+    fi
+
+    # Append each name of the script files to a list (this will become
+    # the names of the targets in the Makefile
+    basicsystem="$basicsystem ${this_script}${N}"
+
+    # Append each name of the script files to a list (this will become
+    # the names of the logs to be moved for each iteration)
+    LOGS="$LOGS ${this_script}"
+
     #--------------------------------------------------------------------#
     #         >>>>>>>> START BUILDING A Makefile ENTRY <<<<<<<<          #
     #--------------------------------------------------------------------#
     #
     # Drop in the name of the target on a new line, and the previous target
     # as a dependency. Also call the echo_message function.
-    wrt_target "${this_script}" "$PREV"
+    wrt_target "${this_script}${N}" "$PREV"
 
     # If $vrs isn't empty, we've got a package...
     if [ "$vrs" != "" ] ; then
-      case $name in
-        temp-perl) wrt_unpack3 "perl-$vrs.tar.*"    ;;
-        *)         wrt_unpack3 "$name-$vrs.tar.*"   ;;
-      esac
+      FILE="$name-$vrs.tar.*"
+      wrt_unpack3 "$FILE"
     fi
     #
     wrt_run_as_root2 "${this_script}" "${file}"
@@ -581,8 +653,9 @@
     #--------------------------------------------------------------------#
     #
     # Keep the script file name for Makefile dependencies.
-    PREV=$this_script
-
+    PREV=${this_script}${N}
+    # Set system_build envar for iteration targets
+    system_build=$basicsystem
   done  # for file in final-system/* ...
 }
 
@@ -885,6 +958,8 @@
       testsuite_tools_Makefiles    # $testsuitetools
     fi
     final_system_Makefiles         # $basicsystem
+    # Add the iterations targets, if needed
+    [[ "$COMPARE" != "0" ]] && wrt_compare_targets
     bootscripts_Makefiles          # $bootscripttools
     bootable_Makefiles             # $bootabletools
   else
@@ -893,6 +968,8 @@
       bm_testsuite_tools_Makefiles # $testsuitetools
     fi
     bm_final_system_Makefiles      # $basicsystem
+    # Add the iterations targets, if needed
+    [[ "$COMPARE" != "0" ]] && wrt_compare_targets
     bm_bootscripts_Makefiles       # $bootscipttools
     bm_bootable_Makefiles          # $bootabletoosl
   fi

Modified: jhalfs/branches/experimental/common/func_validate_configs.sh
===================================================================
--- jhalfs/branches/experimental/common/func_validate_configs.sh	2006-04-29 14:14:45 UTC (rev 2593)
+++ jhalfs/branches/experimental/common/func_validate_configs.sh	2006-04-29 14:16:06 UTC (rev 2594)
@@ -248,7 +248,8 @@
                   write_error_and_die
                echo
                ;;
-      KEYMAP)  save_param=${KEYMAP}
+      KEYMAP)  echo "`eval echo $PARAM_VALS`"
+               save_param=${KEYMAP}
                [[ ! "${!config_param}" = "none" ]] &&
                   KEYMAP="/usr/share/kbd/keymaps/${KEYMAP}" &&
                   validate_file -z -e -s




More information about the alfs-log mailing list