r3221 - in jhalfs/trunk: CLFS CLFS2 CLFS3 HLFS LFS common/libs

manuel at linuxfromscratch.org manuel at linuxfromscratch.org
Sat Nov 11 13:20:16 PST 2006


Author: manuel
Date: 2006-11-11 14:20:15 -0700 (Sat, 11 Nov 2006)
New Revision: 3221

Modified:
   jhalfs/trunk/CLFS/master.sh
   jhalfs/trunk/CLFS2/master.sh
   jhalfs/trunk/CLFS3/master.sh
   jhalfs/trunk/HLFS/master.sh
   jhalfs/trunk/LFS/master.sh
   jhalfs/trunk/common/libs/func_wrt_Makefile
Log:
Functions clean-up.

Modified: jhalfs/trunk/CLFS/master.sh
===================================================================
--- jhalfs/trunk/CLFS/master.sh	2006-11-11 19:55:13 UTC (rev 3220)
+++ jhalfs/trunk/CLFS/master.sh	2006-11-11 21:20:15 UTC (rev 3221)
@@ -357,17 +357,13 @@
     # Insert instructions for unpacking the package and changing directories
     #
     if [ "$pkg_tarball" != "" ] ; then
-      case $this_script in
-        *util-linux)      ROOT_Unpack  "$pkg_tarball"  ;;
-        *)              CHROOT_Unpack "$pkg_tarball"  ;;
-      esac
+      CHROOT_Unpack "$pkg_tarball"
       [[ "$OPTIMIZE" = "2" ]] &&  wrt_optimize "$name" && wrt_makeflags "$name"
     fi
     #
     # Select a script execution method
     case $this_script in
-      *kernfs)      wrt_RunAsRoot         "${this_script}" "${file}"  ;;
-      *util-linux)  ROOT_RunAsRoot        "${file}"  ;;
+      *kernfs)      wrt_RunAsRoot         "${file}"  ;;
       *)            CHROOT_wrt_RunAsRoot  "${file}"  ;;
     esac
     #
@@ -456,8 +452,8 @@
     case $this_script in
        # The following 2 scripts are defined in the /boot directory but need
        # to be run as a root user. Set them up here but run them in another phase
-      *changingowner*)  wrt_RunAsRoot "${this_script}" "${file}"    ;;
-      *devices*)        wrt_RunAsRoot "${this_script}" "${file}"    ;;
+      *changingowner*)  wrt_RunAsRoot "${file}"    ;;
+      *devices*)        wrt_RunAsRoot "${file}"    ;;
       *fstab*)   if [[ -n "$FSTAB" ]]; then
                    LUSER_wrt_CopyFstab
                  else

Modified: jhalfs/trunk/CLFS2/master.sh
===================================================================
--- jhalfs/trunk/CLFS2/master.sh	2006-11-11 19:55:13 UTC (rev 3220)
+++ jhalfs/trunk/CLFS2/master.sh	2006-11-11 21:20:15 UTC (rev 3221)
@@ -391,7 +391,7 @@
                   LUSER_wrt_RunAsUser "${file}"
                 fi
           ;;
-      *chowning)  wrt_RunAsRoot "${this_script}" "${file}"
+      *chowning)  wrt_RunAsRoot "${file}"
           ;;
               *)  LUSER_wrt_RunAsUser "${file}"
           ;;

Modified: jhalfs/trunk/CLFS3/master.sh
===================================================================
--- jhalfs/trunk/CLFS3/master.sh	2006-11-11 19:55:13 UTC (rev 3220)
+++ jhalfs/trunk/CLFS3/master.sh	2006-11-11 21:20:15 UTC (rev 3221)
@@ -385,7 +385,7 @@
                   LUSER_wrt_RunAsUser "${file}"
                 fi
           ;;
-      *chowning)  wrt_RunAsRoot "${this_script}" "${file}"
+      *chowning)  wrt_RunAsRoot "${file}"
           ;;
               *)  LUSER_wrt_RunAsUser "${file}"
           ;;

Modified: jhalfs/trunk/HLFS/master.sh
===================================================================
--- jhalfs/trunk/HLFS/master.sh	2006-11-11 19:55:13 UTC (rev 3220)
+++ jhalfs/trunk/HLFS/master.sh	2006-11-11 21:20:15 UTC (rev 3221)
@@ -362,7 +362,7 @@
     # In the mount of kernel filesystems we need to set HLFS and not to use chroot.
     case "${this_script}" in
       *kernfs* | *changingowner*)
-        wrt_RunAsRoot "${this_script}" "${file}"
+        wrt_RunAsRoot "${file}"
         ;;
       *)   # The rest of Chapter06
         CHROOT_wrt_RunAsRoot "${file}"

Modified: jhalfs/trunk/LFS/master.sh
===================================================================
--- jhalfs/trunk/LFS/master.sh	2006-11-11 19:55:13 UTC (rev 3220)
+++ jhalfs/trunk/LFS/master.sh	2006-11-11 21:20:15 UTC (rev 3221)
@@ -136,7 +136,7 @@
     # and date and disk usage again at the bottom of the log file.
     # The changingowner script must be run as root.
     case "${this_script}" in
-      *changingowner)  wrt_RunAsRoot "${this_script}" "$file" ;;
+      *changingowner)  wrt_RunAsRoot "$file" ;;
       *)               LUSER_wrt_RunAsUser "$file" ;;
     esac
 
@@ -252,7 +252,7 @@
     # In the mount of kernel filesystems we need to set LFS
     # and not to use chroot.
     case "${this_script}" in
-      *kernfs)  wrt_RunAsRoot    "${this_script}" "$file" ;;
+      *kernfs)  wrt_RunAsRoot  "$file" ;;
       *)        CHROOT_wrt_RunAsRoot "$file" ;;
     esac
 

Modified: jhalfs/trunk/common/libs/func_wrt_Makefile
===================================================================
--- jhalfs/trunk/common/libs/func_wrt_Makefile	2006-11-11 19:55:13 UTC (rev 3220)
+++ jhalfs/trunk/common/libs/func_wrt_Makefile	2006-11-11 21:20:15 UTC (rev 3221)
@@ -126,28 +126,6 @@
 #======== UNPACK =======
 
 #----------------------------------#
-ROOT_Unpack() {                    #  An alias, for clairity
-#----------------------------------#
-  local FILE=$1
-  local optSAVE_PREVIOUS=$2
-
-  if [[ "${optSAVE_PREVIOUS}" != "1" ]]; then
-(
-cat << EOF
-	@\$(call remove_existing_dirs,$FILE)
-EOF
-) >> $MKFILE.tmp
-  fi
-
-(
-cat << EOF
-	@\$(call unpack,$FILE)
-	@\$(call get_pkg_root_LUSER)
-EOF
-) >> $MKFILE.tmp
-}
-
-#----------------------------------#
 LUSER_wrt_unpack() {               # Unpack and set 'ROOT' var
 #----------------------------------#
   local FILE=$1
@@ -213,7 +191,7 @@
   local TESTLOGFILE=$1
 (
 cat  << EOF
-	@echo "export TEST_LOG=/\$(SCRIPT_ROOT)/test-logs/$TESTLOGFILE" >> envars && \\
+	@echo "export TEST_LOG=\$(crTESTLOGDIR)/$TESTLOGFILE" >> envars && \\
 	echo "\$(nl_)\`date\`\$(nl_)" >test-logs/$TESTLOGFILE
 EOF
 ) >> $MKFILE.tmp
@@ -228,12 +206,10 @@
 wrt_RunAsRoot() {                  # Some scripts must be run as root..
 #----------------------------------#
   local MOUNT_ENV
-  local this_script=$1
-  local file=$2
+  local file=$1
 
   case ${PROGNAME} in
     lfs   ) MOUNT_ENV="LFS" ;;
-    blfs  ) MOUNT_ENV="BLFS" ;;
     clfs  ) MOUNT_ENV="CLFS" ;;
     clfs2 ) MOUNT_ENV="CLFS" ;;
     clfs3 ) MOUNT_ENV="CLFS" ;;
@@ -250,18 +226,6 @@
 }
 
 #----------------------------------#
-ROOT_RunAsRoot() {                 #
-#----------------------------------#
-  local file=$1
-(
-cat << EOF
-	@( time { source envars && \$(CMDSDIR)/$file >>logs/\$@ 2>&1 ; } ) 2>>logs/\$@ && \\
-	\$(PRT_DU_CR) >>logs/\$@
-EOF
-) >> $MKFILE.tmp
-}
-
-#----------------------------------#
 LUSER_wrt_RunAsUser() {            # Execute script inside time { }, footer to log file
 #----------------------------------#
   local file=$1
@@ -280,7 +244,7 @@
   local file=$1
 (
 cat << EOF
-	@( time { source envars && \$(crCMDSDIR)/$file >>logs/\$@ 2>&1 ; } ) 2>>logs/\$@ && \\
+	@( time { source envars && \$(crCMDSDIR)/`dirname $file`/\$@ >>logs/\$@ 2>&1 ; } ) 2>>logs/\$@ && \\
 	\$(PRT_DU_CR) >>logs/\$@
 EOF
 ) >> $MKFILE.tmp




More information about the alfs-log mailing list