r2730 - in jhalfs/trunk: CLFS HLFS LFS common

jhuntwork at linuxfromscratch.org jhuntwork at linuxfromscratch.org
Sat May 27 15:51:08 PDT 2006


Author: jhuntwork
Date: 2006-05-27 16:51:06 -0600 (Sat, 27 May 2006)
New Revision: 2730

Modified:
   jhalfs/trunk/CLFS/master.sh
   jhalfs/trunk/HLFS/master.sh
   jhalfs/trunk/LFS/master.sh
   jhalfs/trunk/common/common-functions
Log:
Reverting r2729 until a better solution is found

Modified: jhalfs/trunk/CLFS/master.sh
===================================================================
--- jhalfs/trunk/CLFS/master.sh	2006-05-27 21:22:42 UTC (rev 2729)
+++ jhalfs/trunk/CLFS/master.sh	2006-05-27 22:51:06 UTC (rev 2730)
@@ -131,7 +131,7 @@
     #
     # If $vrs isn't empty, we've got a package...
     #
-    [[ "$vrs" != "" ]] && wrt_remove_build_dirs "${name}" && wrt_unpack "$name-$vrs.tar.*"
+    [[ "$vrs" != "" ]] && wrt_unpack "$name-$vrs.tar.*"
     #
     wrt_run_as_su "${this_script}" "${file}"
     #
@@ -183,7 +183,7 @@
     # If $vrs isn't empty, we've got a package...
     # Insert instructions for unpacking the package and to set the PKGDIR variable.
     #
-    [[ "$vrs" != "" ]] && wrt_remove_build_dirs "${name}" && wrt_unpack "$name-$vrs.tar.*"
+    [[ "$vrs" != "" ]] && wrt_unpack "$name-$vrs.tar.*"
     [[ "$vrs" != "" ]] && [[ "$OPTIMIZE" = "2" ]] &&  wrt_optimize "$name" && wrt_makeflags "$name"
     #
     wrt_run_as_su "${this_script}" "${file}"
@@ -255,7 +255,7 @@
     # If $vrs isn't empty, we've got a package...
     # Insert instructions for unpacking the package and changing directories
     #
-    [[ "$vrs" != "" ]] && wrt_remove_build_dirs "${name}" && wrt_unpack "$name-$vrs.tar.*"
+    [[ "$vrs" != "" ]] && wrt_unpack "$name-$vrs.tar.*"
     [[ "$vrs" != "" ]] && [[ "$OPTIMIZE" = "2" ]] &&  wrt_optimize "$name" && wrt_makeflags "$name"
     #
     # Select a script execution method
@@ -324,8 +324,8 @@
     #
     if [ "$vrs" != "" ] ; then
       case $this_script in
-        *util-linux)    wrt_remove_build_dirs "${name}" && wrt_unpack  "$name-$vrs.tar.*"  ;;
-        *)              wrt_remove_build_dirs "${name}" && wrt_unpack2 "$name-$vrs.tar.*"  ;;
+        *util-linux)    wrt_unpack  "$name-$vrs.tar.*"  ;;
+        *)              wrt_unpack2 "$name-$vrs.tar.*"  ;;
       esac
       [[ "$OPTIMIZE" = "2" ]] &&  wrt_optimize "$name" && wrt_makeflags "$name"
     fi
@@ -385,8 +385,8 @@
     wrt_target "${this_script}" "$PREV"
     #
     case $name in
-      tcl)    wrt_remove_build_dirs "${name}" && wrt_unpack2 "$name$vrs-src.tar.*" ;;
-      *)      wrt_remove_build_dirs "${name}" && wrt_unpack2 "$name-$vrs.tar.*"    ;;
+      tcl)    wrt_unpack2 "$name$vrs-src.tar.*" ;;
+      *)      wrt_unpack2 "$name-$vrs.tar.*"    ;;
     esac
     [[ "$OPTIMIZE" = "2" ]] &&  wrt_optimize "$name" && wrt_makeflags "$name"
     #
@@ -440,8 +440,8 @@
     wrt_target "${this_script}" "$PREV"
     #
     case $name in
-      tcl)    wrt_remove_build_dirs2 "${name}" && wrt_unpack3 "$name$vrs-src.tar.*" ;;
-      *)      wrt_remove_build_dirs2 "${name}" && wrt_unpack3 "$name-$vrs.tar.*"    ;;
+      tcl)    wrt_unpack3 "$name$vrs-src.tar.*" ;;
+      *)      wrt_unpack3 "$name-$vrs.tar.*"    ;;
     esac
     [[ "$OPTIMIZE" = "2" ]] &&  wrt_optimize "$name" && wrt_makeflags "$name"
     #
@@ -541,7 +541,6 @@
     # If $vrs isn't empty, we've got a package...
     if [ "$vrs" != "" ] ; then
       FILE="$name-$vrs.tar.*"
-      wrt_remove_build_dirs "${name}"
       wrt_unpack2 "$FILE"
       [[ "$OPTIMIZE" != "0" ]] &&  wrt_optimize "$name" && wrt_makeflags "$name"
     fi
@@ -645,7 +644,6 @@
     # If $vrs isn't empty, we've got a package...
     if [ "$vrs" != "" ] ; then
       FILE="$name-$vrs.tar.*"
-      wrt_remove_build_dirs2 "${name}"
       wrt_unpack3 "$FILE"
       [[ "$OPTIMIZE" != "0" ]] &&  wrt_optimize "$name" && wrt_makeflags "$name"
     fi
@@ -710,7 +708,7 @@
     #
     # If $vrs isn't empty, we've got a package...
     #
-    [[ "$vrs" != "" ]] && wrt_remove_build_dirs "${name}" && wrt_unpack2 "$name-$vrs.tar.*"
+    [[ "$vrs" != "" ]] && wrt_unpack2 "$name-$vrs.tar.*"
     #
     wrt_run_as_chroot1 "${this_script}" "${file}"
     #
@@ -771,7 +769,7 @@
     #
     # If $vrs isn't empty, we've got a package...
     #
-    [[ "$vrs" != "" ]] && wrt_remove_build_dirs2 "${name}" && wrt_unpack3 "$name-$vrs.tar.*"
+    [[ "$vrs" != "" ]] && wrt_unpack3 "$name-$vrs.tar.*"
     #
     wrt_run_as_root2 "${this_script}" "${file}"
     #
@@ -835,7 +833,7 @@
     # If $vrs isn't empty, we've got a package...
     # Insert instructions for unpacking the package and changing directories
     #
-    [[ "$vrs" != "" ]] && wrt_remove_build_dirs "${name}" && wrt_unpack2 "$name-$vrs.tar.*"
+    [[ "$vrs" != "" ]] && wrt_unpack2 "$name-$vrs.tar.*"
     #
     # Select a script execution method
     case $this_script in
@@ -913,7 +911,7 @@
     # If $vrs isn't empty, we've got a package...
     # Insert instructions for unpacking the package and changing directories
     #
-    [[ "$vrs" != "" ]] && wrt_remove_build_dirs2 "${name}" && wrt_unpack3 "$name-$vrs.tar.*"
+    [[ "$vrs" != "" ]] && wrt_unpack3 "$name-$vrs.tar.*"
     #
     # Select a script execution method
     case $this_script in

Modified: jhalfs/trunk/HLFS/master.sh
===================================================================
--- jhalfs/trunk/HLFS/master.sh	2006-05-27 21:22:42 UTC (rev 2729)
+++ jhalfs/trunk/HLFS/master.sh	2006-05-27 22:51:06 UTC (rev 2730)
@@ -140,10 +140,6 @@
         gcc)    FILE="gcc-core-$vrs.tar.*"  ;;
         *)      FILE="$name-$vrs.tar.*"     ;;
       esac
-      # Always remove possibly exiting unpacked source directories before beginning
-      # to build. This prevent build failures from fogetting to manually remove
-      # directories from previous runs of jhalfs.
-      wrt_remove_build_dirs "$name"
       # Insert instructions for unpacking the package and to set the PKGDIR variable.
       wrt_unpack "$FILE"
       [[ "$OPTIMIZE" = "2" ]] &&  wrt_optimize "$name" && wrt_makeflags "$name"
@@ -311,10 +307,6 @@
         gcc)    FILE="gcc-core-$vrs.tar.*" ;;
         *)      FILE="$name-$vrs.tar.*" ;;
       esac
-      # Always remove possibly exiting unpacked source directories before beginning
-      # to build. This prevent build failures from fogetting to manually remove
-      # directories from previous runs of jhalfs.
-      wrt_remove_build_dirs "$name"
       wrt_unpack2 "$FILE"
       wrt_target_vars
       [[ "$OPTIMIZE" != "0" ]] &&  wrt_optimize "$name" && wrt_makeflags "$name"
@@ -579,7 +571,6 @@
 		userdel lfs; \\
 		rm -rf /home/lfs; \\
 	fi;
-	-rm -f /tmp/unpacked
 	
 EOF
 ) >> $MKFILE

Modified: jhalfs/trunk/LFS/master.sh
===================================================================
--- jhalfs/trunk/LFS/master.sh	2006-05-27 21:22:42 UTC (rev 2729)
+++ jhalfs/trunk/LFS/master.sh	2006-05-27 22:51:06 UTC (rev 2730)
@@ -109,10 +109,7 @@
       else
         FILE="$name-$vrs.tar.*"
       fi
-      # Always remove possibly exiting unpacked source directories before beginning
-      # to build. This prevent build failures from fogetting to manually remove
-      # directories from previous runs of jhalfs.
-      wrt_remove_build_dirs "$name"
+
       # Insert instructions for unpacking the package and to set the PKGDIR variable.
       wrt_unpack "$FILE"
       [[ "$OPTIMIZE" = "2" ]] &&  wrt_optimize "$name" && wrt_makeflags "$name"
@@ -218,10 +215,6 @@
     # Insert instructions for unpacking the package and changing directories
     if [ "$vrs" != "" ] ; then
       FILE="$name-$vrs.tar.*"
-      # Always remove possibly exiting unpacked source directories before beginning
-      # to build. This prevent build failures from fogetting to manually remove
-      # directories from previous runs of jhalfs.
-      wrt_remove_build_dirs "$name"
       wrt_unpack2 "$FILE"
       [[ "$OPTIMIZE" != "0" ]] &&  wrt_optimize "$name" && wrt_makeflags "$name"
     fi
@@ -449,7 +442,6 @@
 		userdel lfs; \\
 		rm -rf /home/lfs; \\
 	fi;
-	-rm -f /tmp/unpacked
 	
 EOF
 ) >> $MKFILE

Modified: jhalfs/trunk/common/common-functions
===================================================================
--- jhalfs/trunk/common/common-functions	2006-05-27 21:22:42 UTC (rev 2729)
+++ jhalfs/trunk/common/common-functions	2006-05-27 22:51:06 UTC (rev 2730)
@@ -211,7 +211,6 @@
 wrt_unpack() {                     # Unpack and set 'ROOT' var
 #----------------------------------#
   local FILE=$1
-  local file=$2
 (
 cat << EOF
 	@\$(call unpack,$FILE)
@@ -364,11 +363,9 @@
   local name=$1
 (
 cat << EOF
-	@if [ -f /tmp/unpacked ] ; then \\
-	 	ROOT=\`head -n1 /tmp/unpacked | sed 's@^./@@;s@/.*@@'\` && \\
-	 	if [ "x" != "x\$\$ROOT" ] ; then rm -r \$(MOUNT_PT)\$(SRC)/\$\$ROOT; fi; \\
-	fi;
-	@if [ -e \$(MOUNT_PT)\$(SRC)/$name-build ]; then \\
+	@ROOT=\`head -n1 /tmp/unpacked | sed 's@^./@@;s@/.*@@'\` && \\
+	rm -r \$(MOUNT_PT)\$(SRC)/\$\$ROOT && \\
+	if [ -e \$(MOUNT_PT)\$(SRC)/$name-build ]; then \\
 		rm -r \$(MOUNT_PT)\$(SRC)/$name-build; \\
 	fi;
 EOF
@@ -382,11 +379,9 @@
   local name=$1
 (
 cat << EOF
-	@if [ -f /tmp/unpacked ] ; then \\
-		ROOT=\`head -n1 /tmp/unpacked | sed 's@^./@@;s@/.*@@'\` && \\
-		if [ "x" != "x\$\$ROOT" ] ; then rm -r \$(SRC)/\$\$ROOT; fi; \\
-	fi;
-	@if [ -e \$(SRC)/$name-build ]; then \\
+	@ROOT=\`head -n1 /tmp/unpacked | sed 's@^./@@;s@/.*@@'\` && \\
+	rm -r \$(SRC)/\$\$ROOT && \\
+	if [ -e \$(SRC)/$name-build ]; then \\
 		rm -r \$(SRC)/$name-build; \\
 	fi;
 EOF




More information about the alfs-log mailing list