r2336 - in jhalfs/branches/experimental: LFS common

manuel at linuxfromscratch.org manuel at linuxfromscratch.org
Fri Mar 10 15:35:45 PST 2006


Author: manuel
Date: 2006-03-10 16:35:41 -0700 (Fri, 10 Mar 2006)
New Revision: 2336

Modified:
   jhalfs/branches/experimental/LFS/lfs.xsl
   jhalfs/branches/experimental/LFS/master.sh
   jhalfs/branches/experimental/common/common-functions
Log:
Added LANG configuration option to LFS module.

Modified: jhalfs/branches/experimental/LFS/lfs.xsl
===================================================================
--- jhalfs/branches/experimental/LFS/lfs.xsl	2006-03-10 22:27:16 UTC (rev 2335)
+++ jhalfs/branches/experimental/LFS/lfs.xsl	2006-03-10 23:35:41 UTC (rev 2336)
@@ -123,6 +123,14 @@
         <xsl:value-of select="substring-after(string(),'patch')"/>
         <xsl:text>&#xA;</xsl:text>
       </xsl:when>
+      <!-- Setting $LANG for /et/profile -->
+      <xsl:when test="ancestor::sect1[@id='ch-scripts-profile'] and
+                contains(string(),'export LANG=')">
+        <xsl:value-of select="substring-before(string(),'export LANG=')"/>
+        <xsl:text>export LANG=$LANG</xsl:text>
+        <xsl:value-of select="substring-after(string(),'modifiers]')"/>
+        <xsl:text>&#xA;</xsl:text>
+      </xsl:when>
       <!-- Copying the kernel config file -->
       <xsl:when test="string() = 'make mrproper'">
         <xsl:text>make mrproper&#xA;</xsl:text>

Modified: jhalfs/branches/experimental/LFS/master.sh
===================================================================
--- jhalfs/branches/experimental/LFS/master.sh	2006-03-10 22:27:16 UTC (rev 2335)
+++ jhalfs/branches/experimental/LFS/master.sh	2006-03-10 23:35:41 UTC (rev 2336)
@@ -260,6 +260,10 @@
       wrt_unpack2 "$FILE"
     fi
 
+    case "${this_script}" in
+      *profile*  ) wrt_export_lang ;; # For /etc/profile we need to set LANG envar.
+    esac
+
       # Check if we have a real /etc/fstab file
     if [[ `_IS_ ${this_script} fstab` ]] && [[ -n "$FSTAB" ]] ; then
       wrt_copy_fstab "${this_script}"
@@ -312,6 +316,7 @@
 MOUNT_PT= $BUILDDIR
 PAGE= $PAGE
 TIMEZONE= $TIMEZONE
+LANG= $LANG
 
 include makefile-functions
 

Modified: jhalfs/branches/experimental/common/common-functions
===================================================================
--- jhalfs/branches/experimental/common/common-functions	2006-03-10 22:27:16 UTC (rev 2335)
+++ jhalfs/branches/experimental/common/common-functions	2006-03-10 23:35:41 UTC (rev 2336)
@@ -1,6 +1,9 @@
 #!/bin/bash
-set +e 
 
+# $Id$
+
+set +e
+
 # VT100 colors
 declare -r  BLACK=$'\e[1;30m'
 declare -r  DK_GRAY=$'\e[0;30m'
@@ -235,7 +238,7 @@
 	@ROOT=\`head -n1 /tmp/unpacked | sed 's@^./@@;s@/.*@@'\` && \\
 	echo "export PKGDIR=\$(MOUNT_PT)\$(SRC)/\$\$ROOT" > envars && \\
 
-	chown -R lfs \$(MOUNT_PT)\$(SRC)/\$\$ROOT 
+	chown -R lfs \$(MOUNT_PT)\$(SRC)/\$\$ROOT
 EOF
 ) >> $MKFILE.tmp
 }
@@ -448,6 +451,13 @@
 
 
 #----------------------------------#
+wrt_export_lang() {            #
+#----------------------------------#
+  echo -e '\t at echo "export LANG=$(LANG)" >> envars' >> $MKFILE.tmp
+}
+
+
+#----------------------------------#
 wrt_export_pkgdir() {              #
 #----------------------------------#
 (
@@ -584,7 +594,7 @@
            --xinclude \
            -o patcheslist_.wget \
            patcheslist.xsl \
-           $BOOK/index.xml  
+           $BOOK/index.xml
 	   #> /dev/null 2>&1
 
   rm -f patches
@@ -652,6 +662,9 @@
                  --stringparam testsuite $TEST \
                  --stringparam vim-lang $VIMLANG \
                  -o ./${PROGNAME}-commands/ $XSL $BOOK/index.xml >>$LOGDIR/$LOG 2>&1
+        for i in $(find ./${PROGNAME}-commands/chapter07/*) ; do
+          sed -i 's/"EOF"/EOF/g' $i ;
+        done
       ;;
     blfs)
         echo -n "${tab_} ${L_arrow}${BOLD}BLFS${R_arrow} build"
@@ -663,7 +676,7 @@
       ;;
     *) exit 1
   esac
-    
+
   echo " ...OK"
 
   # Make the scripts executable.
@@ -682,7 +695,7 @@
   echo `grep "udev-config-file" $BOOK/general.ent | sed -e 's@<!ENTITY @@' -e 's@">@"@'` >> packages
 
   # There is no HLFS patches.ent file so we will create one.
-  
+
   case "${PROGNAME}" in
     hlfs)  build_patches_file ;;
     clfs) ;;
@@ -690,7 +703,7 @@
     blfs) ;;
     *) exit 1
   esac
-  
+
   # Done. Moving on...
   get_sources
 }
@@ -701,7 +714,7 @@
 #----------------------------#
   cd $BUILDDIR/sources
 
-  # Hackish fix for the bash-doc, glibc-{linuxthreads,libidn} 
+  # Hackish fix for the bash-doc, glibc-{linuxthreads,libidn}
   # that don't conform to norms in the URL scheme.
   DIR=`echo $1 | sed 's at -doc@@;s at -linuxthreads@@;s at -libidn@@;s at -testsuite@@'`
 
@@ -769,7 +782,7 @@
       if [ "$PKG" = "expect-lib" -o "$PKG" = "linux-dl" ] ; then continue ; fi
 
       VRS=`echo $i | sed -e 's/.* //' -e 's/"//g'`
-      case $PKG in 
+      case $PKG in
 	tcl)         FILE="$PKG$VRS-src.tar.bz2"  ;;
         vim-lang)    PKG="vim"
                      FILE="vim-$VRS-lang.tar.bz2" ;;




More information about the alfs-log mailing list