r3254 - in jhalfs/trunk: CLFS HLFS LFS common common/libs

manuel at linuxfromscratch.org manuel at linuxfromscratch.org
Tue Dec 5 07:25:07 PST 2006


Author: manuel
Date: 2006-12-05 08:25:00 -0700 (Tue, 05 Dec 2006)
New Revision: 3254

Modified:
   jhalfs/trunk/CLFS/master.sh
   jhalfs/trunk/HLFS/master.sh
   jhalfs/trunk/LFS/master.sh
   jhalfs/trunk/common/common-functions
   jhalfs/trunk/common/create-sbu_du-report.sh
   jhalfs/trunk/common/libs/func_compare.sh
   jhalfs/trunk/common/libs/func_wrt_Makefile
Log:
More compare and related fixes.
Test build in progress.

Modified: jhalfs/trunk/CLFS/master.sh
===================================================================
--- jhalfs/trunk/CLFS/master.sh	2006-12-04 20:58:09 UTC (rev 3253)
+++ jhalfs/trunk/CLFS/master.sh	2006-12-05 15:25:00 UTC (rev 3254)
@@ -461,11 +461,13 @@
       sed -e 's/ln -sv/&f/g' \
           -e 's/mv -v/&f/g' \
           -e 's/mkdir -v/&p/g' -i ${script}
+      # Rename the scripts
+      mv ${script} ${script}$N
     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
+    sed -e 's at make install at rm -vf /usr/bin/bz*\n&@' -i final-system$N/*-bzip2$N
     # 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
+    sed -e 's at make install@&\nrm -v /lib/lib{history,readline}*old@' -i final-system$N/*-readline$N
   fi
 
   if [[ "${METHOD}" = "chroot" ]]; then
@@ -491,7 +493,8 @@
                                   -e 's at -64bit@@' \
                                   -e 's at -64@@' \
                                   -e 's at 64@@' \
-                                  -e 's at n32@@'`
+                                  -e 's at n32@@' \
+                                  -e 's,'$N',,'`
 
     # 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
@@ -507,7 +510,7 @@
 
     # 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}"
+    basicsystem="$basicsystem ${this_script}"
 
     #--------------------------------------------------------------------#
     #         >>>>>>>> START BUILDING A Makefile ENTRY <<<<<<<<          #
@@ -515,7 +518,7 @@
     #
     # Drop in the name of the target on a new line, and the previous target
     # as a dependency. Also call the echo_message function.
-    CHROOT_wrt_target "${this_script}${N}" "$PREV"
+    CHROOT_wrt_target "${this_script}" "$PREV"
 
     # If $pkg_tarball isn't empty, we've got a package...
     if [ "$pkg_tarball" != "" ] ; then
@@ -523,10 +526,10 @@
       # If the testsuites must be run, initialize the log file
       case $name in
         binutils | gcc | glibc )
-          [[ "$TEST" != "0" ]] && CHROOT_wrt_test_log "${this_script}${N}"
+          [[ "$TEST" != "0" ]] && CHROOT_wrt_test_log "${this_script}"
           ;;
         * )
-          [[ "$TEST" = "2" ]] || [[ "$TEST" = "3" ]] && CHROOT_wrt_test_log "${this_script}${N}"
+          [[ "$TEST" = "2" ]] || [[ "$TEST" = "3" ]] && CHROOT_wrt_test_log "${this_script}"
           ;;
       esac
       # If using optimizations, write the instructions
@@ -545,7 +548,7 @@
     #--------------------------------------------------------------------#
     #
     # Keep the script file name for Makefile dependencies.
-    PREV=${this_script}${N}
+    PREV=${this_script}
     # Set system_build envar for iteration targets
     system_build=$basicsystem
   done  # for file in final-system/* ...

Modified: jhalfs/trunk/HLFS/master.sh
===================================================================
--- jhalfs/trunk/HLFS/master.sh	2006-12-04 20:58:09 UTC (rev 3253)
+++ jhalfs/trunk/HLFS/master.sh	2006-12-05 15:25:00 UTC (rev 3254)
@@ -19,7 +19,7 @@
   local TC_MountPT
   local remove_existing
 
-  tc_phase=`echo $toolchain | sed -e 's@[0-9]\{3\}-@@' -e 's at -toolchain@@'`
+  tc_phase=`echo $toolchain | sed -e 's@[0-9]\{3\}-@@' -e 's at -toolchain@@' -e 's,'$N',,'`
   case $tc_phase in
     embryo | \
     cocoon)    # Vars for LUSER phase
@@ -268,16 +268,17 @@
     for script in chapter06$N/* ; do
       # Overwrite existing symlinks, files, and dirs
       sed -e 's/ln -s /ln -sf /g' \
-          -e 's/^mv /&-f/g' -i ${script}
+          -e 's/^mv /&-f /g' \
+          -e 's/mkdir -v/&p/g' -i ${script}
+      # Rename the scripts
+      mv ${script} ${script}$N
     done
     # Remove Bzip2 binaries before make install
-    sed -e 's at make install at rm -vf /usr/bin/bz*\n&@' -i chapter06$N/*-bzip2
+    sed -e 's at make install at rm -vf /usr/bin/bz*\n&@' -i chapter06$N/*-bzip2$N
     # Fix how Module-Init-Tools do the install target
-    sed -e 's at make install at make INSTALL=install install@' -i chapter06$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 chapter06$N/*-readline
+    sed -e 's at make install at make INSTALL=install install@' -i chapter06$N/*-module-init-tools$N
     # Don't readd already existing groups
-    sed -e '/groupadd/d' -i chapter06$N/*-udev
+    sed -e '/groupadd/d' -i chapter06$N/*-udev$N
   fi
 
   echo "${tab_}${GREEN}Processing... ${L_arrow}Chapter6$N     ( CHROOT ) ${R_arrow}"
@@ -296,7 +297,7 @@
     esac
 
     # Grab the name of the target
-    name=`echo $this_script | sed -e 's@[0-9]\{3\}-@@'`
+    name=`echo $this_script | sed -e 's@[0-9]\{3\}-@@' -e 's,'$N',,'`
 
     case $name in
       uclibc)  name="uClibc"   ;;
@@ -315,7 +316,7 @@
 
     # Append each name of the script files to a list (this will become
     # the names of the targets in the Makefile
-    chapter6="$chapter6 ${this_script}${N}"
+    chapter6="$chapter6 ${this_script}"
 
 
     #--------------------------------------------------------------------#
@@ -325,14 +326,14 @@
     # Drop in the name of the target on a new line, and the previous target
     # as a dependency. Also call the echo_message function.
     if [[ ${name} = "butterfly-toolchain" ]]; then
-       CHROOT_wrt_target "${this_script}${N}" "$PREV"
+       CHROOT_wrt_target "${this_script}" "$PREV"
          process_toolchain "${this_script}" "${file}"
        wrt_touch
        PREV=$this_script
        continue
     fi
 
-    CHROOT_wrt_target "${this_script}${N}" "$PREV"
+    CHROOT_wrt_target "${this_script}" "$PREV"
 
     # If $pkg_tarball isn't empty, we've got a package...
     # Insert instructions for unpacking the package and changing directories
@@ -341,9 +342,9 @@
       # If the testsuites must be run, initialize the log file
       # butterfly-toolchain tests are enabled in 'process_tookchain' function
       case $name in
-        glibc ) [[ "$TEST" != "0" ]] && CHROOT_wrt_test_log "${this_script}${N}"
+        glibc ) [[ "$TEST" != "0" ]] && CHROOT_wrt_test_log "${this_script}"
           ;;
-	    * ) [[ "$TEST" > "1" ]]  && CHROOT_wrt_test_log "${this_script}${N}"
+	    * ) [[ "$TEST" > "1" ]]  && CHROOT_wrt_test_log "${this_script}"
           ;;
       esac
       # If using optimizations, write the instructions
@@ -373,7 +374,7 @@
     #--------------------------------------------------------------------#
 
     # Keep the script file name for Makefile dependencies.
-    PREV=${this_script}${N}
+    PREV=${this_script}
     # Set system_build envar for iteration targets
     system_build=$chapter6
   done # end for file in chapter06/*

Modified: jhalfs/trunk/LFS/master.sh
===================================================================
--- jhalfs/trunk/LFS/master.sh	2006-12-04 20:58:09 UTC (rev 3253)
+++ jhalfs/trunk/LFS/master.sh	2006-12-05 15:25:00 UTC (rev 3254)
@@ -177,9 +177,11 @@
       sed -e 's/ln -sv/&f/g' \
           -e 's/mv -v/&f/g' \
           -e 's/mkdir -v/&p/g' -i ${script}
+      # Rename the scripts
+      mv ${script} ${script}$N
     done
     # Remove Bzip2 binaries before make install
-    sed -e 's at make install at rm -vf /usr/bin/bz*\n&@' -i chapter06$N/*-bzip2
+    sed -e 's at make install at rm -vf /usr/bin/bz*\n&@' -i chapter06$N/*-bzip2$N
   fi
 
   echo "${tab_}${GREEN}Processing... ${L_arrow}Chapter6$N     ( CHROOT ) ${R_arrow}"
@@ -196,7 +198,7 @@
     esac
 
     # Grab the name of the target.
-    name=`echo ${this_script} | sed -e 's@[0-9]\{3\}-@@'`
+    name=`echo ${this_script} | sed -e 's@[0-9]\{3\}-@@' -e 's,'$N',,'`
 
     # 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
@@ -215,7 +217,7 @@
     # The kernfs script must be run as part of SUDO target.
     case "${this_script}" in
       *kernfs) runasroot="$runasroot ${this_script}" ;;
-            *) chapter6="$chapter6 ${this_script}${N}" ;;
+            *) chapter6="$chapter6 ${this_script}" ;;
     esac
 
     #--------------------------------------------------------------------#
@@ -228,7 +230,7 @@
     # and not to use chroot.
     case "${this_script}" in
       *kernfs)  LUSER_wrt_target  "${this_script}" "$PREV" ;;
-      *)        CHROOT_wrt_target "${this_script}${N}" "$PREV" ;;
+      *)        CHROOT_wrt_target "${this_script}" "$PREV" ;;
     esac
 
     # If $pkg_tarball isn't empty, we've got a package...
@@ -238,10 +240,10 @@
       # If the testsuites must be run, initialize the log file
       case $name in
         binutils | gcc | glibc )
-          [[ "$TEST" != "0" ]] && CHROOT_wrt_test_log "${this_script}${N}"
+          [[ "$TEST" != "0" ]] && CHROOT_wrt_test_log "${this_script}"
           ;;
         * )
-          [[ "$TEST" = "2" ]] || [[ "$TEST" = "3" ]] && CHROOT_wrt_test_log "${this_script}${N}"
+          [[ "$TEST" = "2" ]] || [[ "$TEST" = "3" ]] && CHROOT_wrt_test_log "${this_script}"
           ;;
       esac
       # If using optimizations, write the instructions
@@ -269,7 +271,7 @@
     #--------------------------------------------------------------------#
 
     # Keep the script file name for Makefile dependencies.
-    PREV=${this_script}${N}
+    PREV=${this_script}
     # Set system_build envar for iteration targets
     system_build=$chapter6
   done # end for file in chapter06/*

Modified: jhalfs/trunk/common/common-functions
===================================================================
--- jhalfs/trunk/common/common-functions	2006-12-04 20:58:09 UTC (rev 3253)
+++ jhalfs/trunk/common/common-functions	2006-12-05 15:25:00 UTC (rev 3254)
@@ -55,7 +55,7 @@
     else
       # Clean the build directory
       echo -n "Cleaning $BUILDDIR ..."
-      sudo rm -rf $BUILDDIR/{bin,boot,dev,etc,home,lib,media,mnt,opt,proc,root,sbin,srv,sys,tmp,tools,cross-tools,usr,var}
+      sudo rm -rf $BUILDDIR/{bin,boot,etc,home,lib,media,mnt,opt,root,sbin,srv,tmp,tools,cross-tools,usr,var}
       echo "done"
       echo -n "Cleaning $JHALFSDIR ..."
       sudo rm -rf $JHALFSDIR

Modified: jhalfs/trunk/common/create-sbu_du-report.sh
===================================================================
--- jhalfs/trunk/common/create-sbu_du-report.sh	2006-12-04 20:58:09 UTC (rev 3253)
+++ jhalfs/trunk/common/create-sbu_du-report.sh	2006-12-05 15:25:00 UTC (rev 3254)
@@ -19,8 +19,8 @@
 
 # If there is iteration logs directories, copy the logs inside iteration-1
 # to the top level dir
-[[ -d "$LOGSDIR"/iteration-1 ]] && \
-  cp $LOGSDIR/iteration-1/* $LOGSDIR
+[[ -d "$LOGSDIR"/build_1 ]] && \
+  cp $LOGSDIR/build_1/* $LOGSDIR
 
 # Set the report file
 REPORT="$VERSION"-SBU_DU-$(date --iso-8601).report

Modified: jhalfs/trunk/common/libs/func_compare.sh
===================================================================
--- jhalfs/trunk/common/libs/func_compare.sh	2006-12-04 20:58:09 UTC (rev 3253)
+++ jhalfs/trunk/common/libs/func_compare.sh	2006-12-05 15:25:00 UTC (rev 3254)
@@ -13,6 +13,7 @@
     this_script=$ITERATION
     CHROOT_wrt_target "$ITERATION" "$PREV"
     wrt_compare_work "$ITERATION" "$PREV_IT"
+    wrt_logs "$N"
     wrt_touch
     PREV_IT=$ITERATION
     PREV=$ITERATION
@@ -46,8 +47,6 @@
       chapter6="$chapter6 iteration-$RUN"
     fi
   fi
-
-  echo -e "\nsystem_build_$RUN: $PREV_IT $system_build" >> $MKFILE.tmp
 }
 
 #----------------------------------#
@@ -106,3 +105,37 @@
   local ITEFILE=$3/filelist-$2
   echo -e "\t at extras/farce --directory $OUTPUT $PREDIR $PREFILE $ITEDIR $ITEFILE >>logs/\$@ 2>&1" >> $MKFILE.tmp
 }
+
+#----------------------------------#
+wrt_logs() {                       #
+#----------------------------------#
+  local build=build_$1
+  local file
+
+(
+    cat << EOF
+	@cd logs && \\
+	mkdir $build && \\
+	mv -f ${system_build} $build && \\
+	if [ ! $build = build_1 ] ; then \\
+	  cd $build && \\
+	  for file in \`ls .\` ; do \\
+	    mv -f \$\$file \`echo \$\$file | sed -e 's,-$build,,'\` ; \\
+	  done ; \\
+	fi ;
+	@cd /\$(SCRIPT_ROOT)
+	@if [ -d test-logs ] ; then \\
+	  cd test-logs && \\
+	  mkdir $build && \\
+	  mv -f ${system_build} $build && \\
+	  if [ ! $build = build_1 ] ; then \\
+	    cd $build && \\
+	    for file in \`ls .\` ; do \\
+	      mv -f \$\$file \`echo \$\$file | sed -e 's,-$build,,'\` ; \\
+	    done ; \\
+	  fi ; \\
+	  cd /\$(SCRIPT_ROOT) ; \\
+	fi ;
+EOF
+) >> $MKFILE.tmp
+}

Modified: jhalfs/trunk/common/libs/func_wrt_Makefile
===================================================================
--- jhalfs/trunk/common/libs/func_wrt_Makefile	2006-12-04 20:58:09 UTC (rev 3253)
+++ jhalfs/trunk/common/libs/func_wrt_Makefile	2006-12-05 15:25:00 UTC (rev 3254)
@@ -186,7 +186,7 @@
 (
 cat  << EOF
 	@echo "export  TEST_LOG=\$(TESTLOGDIR)/$TESTLOGFILE" >> envars && \\
-	echo '\$(nl_)\`date\`\$(nl_)' >\$(TESTLOGDIR)/\$@
+	echo "\$(nl_)\`date\`\$(nl_)" >\$(TESTLOGDIR)/\$@
 EOF
 ) >> $MKFILE.tmp
 }




More information about the alfs-log mailing list