Set the actual LANG and LC_ALL values inside the generated scripts instead of exported envars.

This commit is contained in:
Manuel Canales Esparcia 2006-03-19 13:40:28 +00:00
parent ad71d98ef1
commit d87b293ccd
6 changed files with 17 additions and 41 deletions

View file

@ -1212,8 +1212,6 @@ $HEADER
SRC= /sources
MOUNT_PT= $BUILDDIR
PAGE= $PAGE
TIMEZONE= $TIMEZONE
include makefile-functions

View file

@ -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>

View file

@ -453,10 +453,6 @@ EOF
echo -e "\t@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 @@ $HEADER
SRC= /sources
MOUNT_PT= $BUILDDIR
PAGE= $PAGE
TIMEZONE= $TIMEZONE
LC_ALL= $LC_ALL
LANG= $LANG
include makefile-functions

View file

@ -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>

View file

@ -255,10 +255,6 @@ chapter789_Makefiles() {
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 @@ $HEADER
SRC= /sources
MOUNT_PT= $BUILDDIR
PAGE= $PAGE
TIMEZONE= $TIMEZONE
LANG= $LANG
include makefile-functions

View file

@ -420,21 +420,6 @@ EOF
}
#----------------------------------#
wrt_export_lang() { #
#----------------------------------#
echo -e '\t@echo "export LANG=$(LANG)" > envars' >> $MKFILE.tmp
}
#----------------------------------#
wrt_export_lang2() { #
#----------------------------------#
echo -e '\t@echo "export LC_ALL=$(LC_ALL)" > envars' >> $MKFILE.tmp
echo -e '\t@echo "export LANG=$(LANG)" >> envars' >> $MKFILE.tmp
}
#----------------------------------#
wrt_export_pkgdir() { #
#----------------------------------#
@ -633,12 +618,11 @@ extract_commands() { #
--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 @@ extract_commands() { #
--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"