r2370 - in jhalfs/branches/experimental: CLFS HLFS LFS common

manuel at linuxfromscratch.org manuel at linuxfromscratch.org
Sun Mar 19 05:40:29 PST 2006


Author: manuel
Date: 2006-03-19 06:40:28 -0700 (Sun, 19 Mar 2006)
New Revision: 2370

Modified:
   jhalfs/branches/experimental/CLFS/master.sh
   jhalfs/branches/experimental/HLFS/hlfs.xsl
   jhalfs/branches/experimental/HLFS/master.sh
   jhalfs/branches/experimental/LFS/lfs.xsl
   jhalfs/branches/experimental/LFS/master.sh
   jhalfs/branches/experimental/common/common-functions
Log:
Set the actual LANG and LC_ALL values inside the generated scripts instead of exported envars.

Modified: jhalfs/branches/experimental/CLFS/master.sh
===================================================================
--- jhalfs/branches/experimental/CLFS/master.sh	2006-03-19 12:44:32 UTC (rev 2369)
+++ jhalfs/branches/experimental/CLFS/master.sh	2006-03-19 13:40:28 UTC (rev 2370)
@@ -1212,8 +1212,6 @@
 
 SRC= /sources
 MOUNT_PT= $BUILDDIR
-PAGE= $PAGE
-TIMEZONE= $TIMEZONE
 
 include makefile-functions
 

Modified: jhalfs/branches/experimental/HLFS/hlfs.xsl
===================================================================
--- jhalfs/branches/experimental/HLFS/hlfs.xsl	2006-03-19 12:44:32 UTC (rev 2369)
+++ jhalfs/branches/experimental/HLFS/hlfs.xsl	2006-03-19 13:40:28 UTC (rev 2370)
@@ -35,6 +35,10 @@
   <!-- Page size -->
   <xsl:param name="page" select="letter"/>
 
+  <!-- Locale settings -->
+  <xsl:param name="lang" select="en_ca"/>
+  <xsl:param name="lc_all" select="en_ca"/>
+
   <xsl:template match="/">
     <xsl:apply-templates select="//sect1"/>
   </xsl:template>
@@ -176,8 +180,11 @@
       <xsl:when test="ancestor::sect1[@id='bootable-profile'] and
                 contains(string(),'export LANG=')">
         <xsl:value-of select="substring-before(string(),'export LC_ALL=')"/>
-        <xsl:text>export LC_ALL=$LC_ALL&#xA;export LANG=$LANG&#xA;</xsl:text>
-        <xsl:text>export INPUTRC</xsl:text>
+        <xsl:text>export LC_ALL=</xsl:text>
+        <xsl:value-of select="$lc_all"/>
+        <xsl:text>&#xA;export LANG=</xsl:text>
+        <xsl:value-of select="$lang"/>
+        <xsl:text>&#xA;export INPUTRC</xsl:text>
         <xsl:value-of select="substring-after(string(),'INPUTRC')"/>
         <xsl:text>&#xA;</xsl:text>
       </xsl:when>

Modified: jhalfs/branches/experimental/HLFS/master.sh
===================================================================
--- jhalfs/branches/experimental/HLFS/master.sh	2006-03-19 12:44:32 UTC (rev 2369)
+++ jhalfs/branches/experimental/HLFS/master.sh	2006-03-19 13:40:28 UTC (rev 2370)
@@ -453,10 +453,6 @@
       echo -e "\t at cp -f $CONFIG \$(MOUNT_PT)/sources/kernel-config" >> $MKFILE.tmp
     fi
 
-    case "${this_script}" in
-      *profile*  ) wrt_export_lang2 ;; # 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"
@@ -512,10 +508,6 @@
 
 SRC= /sources
 MOUNT_PT= $BUILDDIR
-PAGE= $PAGE
-TIMEZONE= $TIMEZONE
-LC_ALL= $LC_ALL
-LANG= $LANG
 
 include makefile-functions
 

Modified: jhalfs/branches/experimental/LFS/lfs.xsl
===================================================================
--- jhalfs/branches/experimental/LFS/lfs.xsl	2006-03-19 12:44:32 UTC (rev 2369)
+++ jhalfs/branches/experimental/LFS/lfs.xsl	2006-03-19 13:40:28 UTC (rev 2370)
@@ -29,6 +29,9 @@
   <!-- Page size -->
   <xsl:param name="page" select="letter"/>
 
+  <!-- Locale settings -->
+  <xsl:param name="lang" select="en_ca"/>
+
   <xsl:template match="/">
     <xsl:apply-templates select="//sect1"/>
   </xsl:template>
@@ -133,7 +136,8 @@
       <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:text>export LANG=</xsl:text>
+        <xsl:value-of select="$lang"/>
         <xsl:value-of select="substring-after(string(),'modifiers]')"/>
         <xsl:text>&#xA;</xsl:text>
       </xsl:when>

Modified: jhalfs/branches/experimental/LFS/master.sh
===================================================================
--- jhalfs/branches/experimental/LFS/master.sh	2006-03-19 12:44:32 UTC (rev 2369)
+++ jhalfs/branches/experimental/LFS/master.sh	2006-03-19 13:40:28 UTC (rev 2370)
@@ -255,10 +255,6 @@
       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}"
@@ -309,9 +305,6 @@
 
 SRC= /sources
 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-19 12:44:32 UTC (rev 2369)
+++ jhalfs/branches/experimental/common/common-functions	2006-03-19 13:40:28 UTC (rev 2370)
@@ -421,21 +421,6 @@
 
 
 #----------------------------------#
-wrt_export_lang() {            #
-#----------------------------------#
-  echo -e '\t at echo "export LANG=$(LANG)" > envars' >> $MKFILE.tmp
-}
-
-
-#----------------------------------#
-wrt_export_lang2() {            #
-#----------------------------------#
-  echo -e '\t at echo "export LC_ALL=$(LC_ALL)" > envars' >> $MKFILE.tmp
-  echo -e '\t at echo "export LANG=$(LANG)" >> envars' >> $MKFILE.tmp
-}
-
-
-#----------------------------------#
 wrt_export_pkgdir() {              #
 #----------------------------------#
 (
@@ -633,12 +618,11 @@
                  --stringparam testsuite $TEST \
                  --stringparam timezone $TIMEZONE \
                  --stringparam page $PAGE \
+                 --stringparam lang $LANG \
+                 --stringparam lc_all $LC_ALL \
                  --stringparam keymap $KEYMAP \
                  --stringparam grsecurity_host $GRSECURITY_HOST \
                  -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
       ;;
     lfs)
         echo -n "${tab_} ${L_arrow}${BOLD}LFS${R_arrow} build"
@@ -648,10 +632,8 @@
                  --stringparam vim-lang $VIMLANG \
                  --stringparam timezone $TIMEZONE \
                  --stringparam page $PAGE \
+                 --stringparam lang $LANG \
                  -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"




More information about the alfs-log mailing list