r3777 - jhalfs/trunk/CLFS

pierre at higgs.linuxfromscratch.org pierre at higgs.linuxfromscratch.org
Tue Jan 21 13:36:12 PST 2014


Author: pierre
Date: Tue Jan 21 13:36:12 2014
New Revision: 3777

Log:
Avoid clobbering suffixes like "-64bit" or "-n32" from install-logs names
in CLFS/master.sh. Reported by W. Harrington. Thanks.
Also correct a bug: log_new_files was called instead of touch_time_stamp.

Modified:
   jhalfs/trunk/CLFS/master.sh

Modified: jhalfs/trunk/CLFS/master.sh
==============================================================================
--- jhalfs/trunk/CLFS/master.sh	Sun Jan 12 13:43:04 2014	(r3776)
+++ jhalfs/trunk/CLFS/master.sh	Tue Jan 21 13:36:12 2014	(r3777)
@@ -512,20 +512,23 @@
     this_script=`basename $file`
 
     # Test if the stripping phase must be skipped.
-    # Skip alsp temp-perl for iterative runs
+    # Skip also temp-perl for iterative runs
     case $this_script in
       *stripping*) [[ "$STRIP" = "n" ]] && continue ;;
       *temp-perl*) [[ -n "$N" ]] && continue ;;
     esac
 
-    # 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-@@' \
-                                  -e 's at -64bit@@' \
-                                  -e 's at -64@@' \
-                                  -e 's at 64@@' \
-                                  -e 's at n32@@' \
-                                  -e 's,'$N',,'`
+    # Grab the name of the target, strip id number, XXX-script.
+    # name1 is partially stripped and should be used for logging files.
+    # name is completely stripped and is used for grabbing
+    # the package name.
+    name1=`echo $this_script | sed -e 's@[0-9]\{3\}-@@' \
+                                   -e 's,'$N',,'`
+    name=`echo $name1 | sed -e 's at temp-@@' \
+                            -e 's at -64bit@@' \
+                            -e 's at -64@@' \
+                            -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
@@ -579,7 +582,7 @@
     if [ "$pkg_tarball" != "" ] ; then
       CHROOT_wrt_RemoveBuildDirs "$name"
       if [ "${INSTALL_LOG}" = "y" ] && [ "x${N}" = "x" ] ; then
-        CHROOT_wrt_LogNewFiles "$name"
+        CHROOT_wrt_LogNewFiles "$name1"
       fi
     fi
     #
@@ -622,12 +625,15 @@
     # the names of the targets in the Makefile
     bootscripttools="$bootscripttools $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 -64bit@@' \
-                                  -e 's at -64@@' \
-                                  -e 's at 64@@' \
-                                  -e 's at n32@@'`
+    # Grab the name of the target, strip id number, XXX-script.
+    # name1 is partially stripped and should be used for logging files.
+    # name is completely stripped and is used for grabbing
+    # the package name.
+    name1=`echo $this_script | sed -e 's@[0-9]\{3\}-@@'`
+    name=`echo $name1 | sed -e 's at -64bit@@' \
+                            -e 's at -64@@' \
+                            -e 's at 64@@' \
+                            -e 's at n32@@'`
     case $name in
       *bootscripts*) name=bootscripts-cross-lfs ;;
       *udev-rules)   name=udev-cross-lfs ;;
@@ -647,7 +653,7 @@
     #
     if [ "$pkg_tarball" != "" ] ; then
       if [ "${INSTALL_LOG}" = "y" ] ; then
-        CHROOT_wrt_LogNewFiles "$name"
+        CHROOT_wrt_TouchTimestamp
       fi
       CHROOT_Unpack "$pkg_tarball"
     fi
@@ -659,7 +665,7 @@
     if [ "$pkg_tarball" != "" ] ; then
       CHROOT_wrt_RemoveBuildDirs "$name"
       if [ "${INSTALL_LOG}" = "y" ] ; then
-        CHROOT_wrt_LogNewFiles "$name"
+        CHROOT_wrt_LogNewFiles "$name1"
       fi
     fi
     #
@@ -702,11 +708,14 @@
     networktools="$networktools $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 -64bit@@' \
-                                  -e 's at -64@@' \
-                                  -e 's at 64@@' \
-                                  -e 's at n32@@'`
+    # name1 is partially stripped and should be used for logging files.
+    # name is completely stripped and is used for grabbing
+    # the package name.
+    name1=`echo $this_script | sed -e 's@[0-9]\{3\}-@@'`
+    name=`echo $name1 | sed -e 's at -64bit@@' \
+                            -e 's at -64@@' \
+                            -e 's at 64@@' \
+                            -e 's at n32@@'`
     case $name in
       *network*) name=network-cross-lfs ;;
     esac
@@ -725,7 +734,7 @@
     #
     if [ "$pkg_tarball" != "" ] ; then
       if [ "${INSTALL_LOG}" = "y" ] ; then
-        CHROOT_wrt_LogNewFiles "$name"
+        CHROOT_wrt_TouchTimestamp
       fi
       CHROOT_Unpack "$pkg_tarball"
     fi
@@ -737,7 +746,7 @@
     if [ "$pkg_tarball" != "" ] ; then
       CHROOT_wrt_RemoveBuildDirs "$name"
       if [ "${INSTALL_LOG}" = "y" ] ; then
-        CHROOT_wrt_LogNewFiles "$name"
+        CHROOT_wrt_LogNewFiles "$name1"
       fi
     fi
     #
@@ -806,7 +815,7 @@
     #
     if [ "$pkg_tarball" != "" ] ; then
       if [ "${INSTALL_LOG}" = "y" ] ; then
-        CHROOT_wrt_LogNewFiles "$name"
+        CHROOT_wrt_TouchTimestamp
       fi
       CHROOT_Unpack "$pkg_tarball"
     fi



More information about the alfs-log mailing list