r2737 - in jhalfs/trunk: CLFS HLFS LFS common

manuel at linuxfromscratch.org manuel at linuxfromscratch.org
Thu Jun 1 11:42:10 PDT 2006


Author: manuel
Date: 2006-06-01 12:42:08 -0600 (Thu, 01 Jun 2006)
New Revision: 2737

Modified:
   jhalfs/trunk/CLFS/master.sh
   jhalfs/trunk/HLFS/master.sh
   jhalfs/trunk/LFS/master.sh
   jhalfs/trunk/common/common-functions
   jhalfs/trunk/common/config
   jhalfs/trunk/common/makefile-functions
Log:
Creating "unpacked" inside souces dir instead /tmp and referencing it via envar.

Modified: jhalfs/trunk/CLFS/master.sh
===================================================================
--- jhalfs/trunk/CLFS/master.sh	2006-06-01 02:34:38 UTC (rev 2736)
+++ jhalfs/trunk/CLFS/master.sh	2006-06-01 18:42:08 UTC (rev 2737)
@@ -991,6 +991,7 @@
 
 SRC= /sources
 MOUNT_PT= $BUILDDIR
+PKG_LST= $PKG_LST
 MAKE_PID=\`pidof make | cut -d " " -f1\`
 
 include makefile-functions

Modified: jhalfs/trunk/HLFS/master.sh
===================================================================
--- jhalfs/trunk/HLFS/master.sh	2006-06-01 02:34:38 UTC (rev 2736)
+++ jhalfs/trunk/HLFS/master.sh	2006-06-01 18:42:08 UTC (rev 2737)
@@ -142,7 +142,7 @@
       esac
       # Insert instructions for unpacking the package and to set the PKGDIR variable.
       case $this_script in
-        *binutils* ) 
+        *binutils* )
 	  wrt_unpack "$FILE" 1 ;; # Do not delete an existing package directories
 	*)
 	  wrt_unpack "$FILE" ;;
@@ -154,7 +154,7 @@
       *binutils* )  # Dump the path to sources directory for later removal
 (
 cat << EOF
-	@ROOT=\`head -n1 /tmp/unpacked | sed 's@^./@@;s@/.*@@'\` && \\
+	@ROOT=\`head -n1 \$(MOUNT_PT)\$(SRC)/\$(PKG_LST) | sed 's@^./@@;s@/.*@@'\` && \\
 	echo "\$(MOUNT_PT)\$(SRC)/\$\$ROOT" >> sources-dir
 EOF
 ) >> $MKFILE.tmp
@@ -434,7 +434,7 @@
       *bootscripts*)
 (
 cat << EOF
-	@ROOT=\`head -n1 /tmp/unpacked | sed 's@^./@@;s@/.*@@'\` && \\
+	@ROOT=\`head -n1 \$(MOUNT_PT)\$(SRC)/\$(PKG_LST) | sed 's@^./@@;s@/.*@@'\` && \\
 	rm -r \$(MOUNT_PT)\$(SRC)/\$\$ROOT
 	@rm -r \`cat sources-dir\` && \\
 	rm sources-dir
@@ -483,6 +483,7 @@
 
 SRC= /sources
 MOUNT_PT= $BUILDDIR
+PKG_LST= $PKG_LST
 MAKE_PID=\`pidof make | cut -d " " -f1\`
 
 include makefile-functions

Modified: jhalfs/trunk/LFS/master.sh
===================================================================
--- jhalfs/trunk/LFS/master.sh	2006-06-01 02:34:38 UTC (rev 2736)
+++ jhalfs/trunk/LFS/master.sh	2006-06-01 18:42:08 UTC (rev 2737)
@@ -355,6 +355,7 @@
 
 SRC= /sources
 MOUNT_PT= $BUILDDIR
+PKG_LST= $PKG_LST
 MAKE_PID=\`pidof make | cut -d " " -f1\`
 
 include makefile-functions

Modified: jhalfs/trunk/common/common-functions
===================================================================
--- jhalfs/trunk/common/common-functions	2006-06-01 02:34:38 UTC (rev 2736)
+++ jhalfs/trunk/common/common-functions	2006-06-01 18:42:08 UTC (rev 2737)
@@ -247,14 +247,14 @@
 #----------------------------------#
   local FILE=$1
   local optSAVE_PREVIOUS=$2
-  
+
   if [ "${optSAVE_PREVIOUS}" != "1" ]; then
     wrt_remove_existing_dirs "$FILE"
   fi
 (
 cat << EOF
 	@\$(call unpack,$FILE)
-	@ROOT=\`head -n1 /tmp/unpacked | sed 's@^./@@;s@/.*@@'\` && \\
+	@ROOT=\`head -n1 \$(MOUNT_PT)\$(SRC)/\$(PKG_LST) | sed 's@^./@@;s@/.*@@'\` && \\
 	echo "export PKGDIR=\$(MOUNT_PT)\$(SRC)/\$\$ROOT" > envars && \\
 	chown -R lfs \$(MOUNT_PT)\$(SRC)/\$\$ROOT
 EOF
@@ -274,7 +274,7 @@
 (
 cat  << EOF
 	@\$(call unpack2,$FILE)
-	@ROOT=\`head -n1 /tmp/unpacked | sed 's@^./@@;s@/.*@@'\` && \\
+	@ROOT=\`head -n1 \$(SRC)/\$(PKG_LST) | sed 's@^./@@;s@/.*@@'\` && \\
 	echo "export PKGDIR=\$(SRC)/\$\$ROOT" > envars
 EOF
 ) >> $MKFILE.tmp
@@ -293,7 +293,7 @@
 (
 cat  << EOF
 	@\$(call unpack3,$FILE)
-	@ROOT=\`head -n1 /tmp/unpacked | sed 's@^./@@;s@/.*@@'\` && \\
+	@ROOT=\`head -n1 \$(SRC)/\$(PKG_LST) | sed 's@^./@@;s@/.*@@'\` && \\
 	echo "export PKGDIR=\$(SRC)/\$\$ROOT" > envars
 EOF
 ) >> $MKFILE.tmp
@@ -412,7 +412,7 @@
   local name=$1
 (
 cat << EOF
-	@ROOT=\`head -n1 /tmp/unpacked | sed 's@^./@@;s@/.*@@'\` && \\
+	@ROOT=\`head -n1 \$(MOUNT_PT)\$(SRC)/\$(PKG_LST) | sed 's@^./@@;s@/.*@@'\` && \\
 	rm -r \$(MOUNT_PT)\$(SRC)/\$\$ROOT && \\
 	if [ -e \$(MOUNT_PT)\$(SRC)/$name-build ]; then \\
 		rm -r \$(MOUNT_PT)\$(SRC)/$name-build; \\
@@ -428,7 +428,7 @@
   local name=$1
 (
 cat << EOF
-	@ROOT=\`head -n1 /tmp/unpacked | sed 's@^./@@;s@/.*@@'\` && \\
+	@ROOT=\`head -n1 \$(SRC)/\$(PKG_LST) | sed 's@^./@@;s@/.*@@'\` && \\
 	rm -r \$(SRC)/\$\$ROOT && \\
 	if [ -e \$(SRC)/$name-build ]; then \\
 		rm -r \$(SRC)/$name-build; \\

Modified: jhalfs/trunk/common/config
===================================================================
--- jhalfs/trunk/common/config	2006-06-01 02:34:38 UTC (rev 2736)
+++ jhalfs/trunk/common/config	2006-06-01 18:42:08 UTC (rev 2737)
@@ -91,6 +91,9 @@
 JHALFSDIR=$BUILDDIR/jhalfs
    LOGDIR=$JHALFSDIR/logs
 
+#--- File listing package contents (from where package sources dir is extracted)
+PKG_LST=unpacked
+
 #--- ICA report log directory
 ICALOGDIR=$LOGDIR/ICA
 

Modified: jhalfs/trunk/common/makefile-functions
===================================================================
--- jhalfs/trunk/common/makefile-functions	2006-06-01 02:34:38 UTC (rev 2736)
+++ jhalfs/trunk/common/makefile-functions	2006-06-01 18:42:08 UTC (rev 2737)
@@ -17,17 +17,17 @@
 
 define unpack
   @cd $(MOUNT_PT)$(SRC) && \
-  tar -xvf `ls -t $(1) | head -n1` > /tmp/unpacked
+  tar -xvf `ls -t $(1) | head -n1` > $(PKG_LST)
 endef
 
 define unpack2
   @cd $(MOUNT_PT)$(SRC) && \
-  /tools/bin/tar -xvf `ls -t $(1) | head -n1` > /tmp/unpacked
+  /tools/bin/tar -xvf `ls -t $(1) | head -n1` > $(PKG_LST)
 endef
 
 define unpack3
   @cd $(SRC) && \
-  tar -xvf `ls -t $(1) | head -n1` > /tmp/unpacked
+  tar -xvf `ls -t $(1) | head -n1` > $(PKG_LST)
 endef
 
 define echo_report




More information about the alfs-log mailing list