Various fixes and improvements coming from github:

- the case for "pax" in packInstall.sh.prog
- an error in packageManager.xml.porg (comment before <?xml?> tag)
- a non-working $Id in Makefile
- some fixes for using the sect1info in lfs (in BLFS tools)
- a big rewrite for generating scripts with more consistent line spacing,
  opening the way to manage remap="test" and remap="doc" attributes
This commit is contained in:
Pierre Labastie 2019-06-15 15:26:23 +00:00
parent 77a8042414
commit 619b313adb
7 changed files with 170 additions and 134 deletions

View File

@ -6,6 +6,7 @@
<!-- $Id$ -->
<xsl:template match="screen" mode="installation">
<xsl:param name="want-stats" select="false"/>
<!-- "nature" variables:
- 'non-root': executable as user
- 'config': execute as root, with no special formatting
@ -34,10 +35,15 @@
</xsl:choose>
</xsl:variable>
<xsl:variable
name="prec-screen"
select="preceding::screen[not(@role='nodump') and ./userinput][1]
[ancestor::sect2 = current()/ancestor::sect2]"/>
<xsl:variable
name="prec-string"
select="string(preceding-sibling::screen[not(@role='nodump') and
./userinput][1])"/>
select="string($prec-screen)"/>
<!--
<xsl:message>
<xsl:text>
@ -60,16 +66,14 @@ List of preceding siblings for "</xsl:text>
<xsl:choose>
<xsl:when
test="$prec-string='' or
(preceding-sibling::screen[not(@role='nodump') and
./userinput] |
preceding-sibling::para/command[contains(text(),'check') or
contains(text(),'test')]
(preceding::screen[not(@role='nodump') and
./userinput] |
preceding::command[contains(text(),'check') or
contains(text(),'test')]
)[last()][self::command]">
<xsl:text>none</xsl:text>
</xsl:when>
<xsl:when
test="preceding-sibling::screen
[not(@role='nodump') and ./userinput][1][not(@role)]">
<xsl:when test="$prec-screen[not(@role)]">
<xsl:text>non-root</xsl:text>
</xsl:when>
<xsl:when test="contains($prec-string,'useradd') or
@ -89,25 +93,27 @@ List of preceding siblings for "</xsl:text>
</xsl:choose>
</xsl:variable>
<xsl:variable
name="follow-screen"
select="following::screen[not(@role='nodump') and ./userinput][1]
[ancestor::sect2 = current()/ancestor::sect2]"/>
<xsl:variable
name="follow-string"
select="string(following-sibling::screen[not(@role='nodump') and
./userinput][1])"/>
select="string($follow-screen)"/>
<xsl:variable name="follow-nature">
<xsl:choose>
<xsl:when
test="$follow-string='' or
(following-sibling::screen[not(@role='nodump') and
./userinput] |
following-sibling::para/command[contains(text(),'check') or
contains(text(),'test')]
(following::screen[not(@role='nodump') and
./userinput] |
following::command[contains(text(),'check') or
contains(text(),'test')]
)[1][self::command]">
<xsl:text>none</xsl:text>
</xsl:when>
<xsl:when
test="following-sibling::screen
[not(@role='nodump') and ./userinput][1][not(@role)]">
<xsl:when test="$follow-screen[not(@role)]">
<xsl:text>non-root</xsl:text>
</xsl:when>
<xsl:when test="contains($follow-string,'useradd') or
@ -137,8 +143,6 @@ List of preceding siblings for "</xsl:text>
<xsl:call-template name="end-root"/>
</xsl:if>
<xsl:apply-templates/>
<xsl:text>
</xsl:text>
</xsl:when>
<xsl:when test="$my-nature='config'">
@ -149,8 +153,6 @@ List of preceding siblings for "</xsl:text>
<xsl:call-template name="end-install"/>
</xsl:if>
<xsl:apply-templates mode="root"/>
<xsl:text>
</xsl:text>
<xsl:if test="$follow-nature='none'">
<xsl:call-template name="end-root"/>
</xsl:if>
@ -158,16 +160,14 @@ List of preceding siblings for "</xsl:text>
<xsl:when test="$my-nature='install'">
<xsl:if test="$prec-nature='none' or $prec-nature='non-root'">
<xsl:if test="contains($list-stat-norm,
concat(' ',ancestor::sect1/@id,' '))">
<xsl:if test="$want-stats">
<xsl:call-template name="output-destdir"/>
</xsl:if>
<xsl:call-template name="begin-root"/>
<xsl:call-template name="begin-install"/>
</xsl:if>
<xsl:if test="$prec-nature='config'">
<xsl:if test="contains($list-stat-norm,
concat(' ',ancestor::sect1/@id,' '))">
<xsl:if test="$want-stats">
<xsl:call-template name="end-root"/>
<xsl:call-template name="output-destdir"/>
<xsl:call-template name="begin-root"/>
@ -175,8 +175,6 @@ List of preceding siblings for "</xsl:text>
<xsl:call-template name="begin-install"/>
</xsl:if>
<xsl:apply-templates mode="install"/>
<xsl:text>
</xsl:text>
<xsl:if test="$follow-nature='none'">
<xsl:call-template name="end-install"/>
<xsl:call-template name="end-root"/>
@ -188,27 +186,27 @@ List of preceding siblings for "</xsl:text>
<xsl:template name="begin-root">
<xsl:if test="$sudo='y'">
<xsl:text>sudo -E sh &lt;&lt; ROOT_EOF
</xsl:text>
<xsl:text>
sudo -E sh &lt;&lt; ROOT_EOF</xsl:text>
</xsl:if>
</xsl:template>
<xsl:template name="begin-install">
<xsl:if test="$wrap-install = 'y'">
<xsl:text>if [ -r "$JH_PACK_INSTALL" ]; then
<xsl:text>
if [ -r "$JH_PACK_INSTALL" ]; then
source $JH_PACK_INSTALL
export -f wrapInstall
export -f packInstall
fi
wrapInstall '
</xsl:text>
wrapInstall '</xsl:text>
</xsl:if>
</xsl:template>
<xsl:template name="end-root">
<xsl:if test="$sudo='y'">
<xsl:text>ROOT_EOF
</xsl:text>
<xsl:text>
ROOT_EOF</xsl:text>
</xsl:if>
</xsl:template>
@ -219,19 +217,36 @@ wrapInstall '
</xsl:call-template>
</xsl:if>
<xsl:if test="$wrap-install = 'y'">
<xsl:text>'&#xA;packInstall&#xA;</xsl:text>
<xsl:text>'&#xA;packInstall</xsl:text>
</xsl:if>
</xsl:template>
<xsl:template match="text()" mode="install">
<xsl:template match="userinput" mode="install">
<xsl:text>
</xsl:text>
<xsl:call-template name="output-install">
<xsl:with-param name="out-string" select="."/>
<xsl:with-param name="out-string" select="string()"/>
</xsl:call-template>
</xsl:template>
<xsl:template name="output-install">
<xsl:param name="out-string" select="''"/>
<xsl:choose>
<xsl:when test="starts-with($out-string, 'make ') or
contains($out-string,' make ') or
contains($out-string,'&#xA;make')">
<xsl:call-template name="output-install">
<xsl:with-param
name="out-string"
select="substring-before($out-string,'make ')"/>
</xsl:call-template>
<xsl:text>make -j1 </xsl:text>
<xsl:call-template name="output-install">
<xsl:with-param
name="out-string"
select="substring-after($out-string,'make ')"/>
</xsl:call-template>
</xsl:when>
<xsl:when test="contains($out-string,string($APOS))
and $wrap-install = 'y'">
<xsl:call-template name="output-root">

View File

@ -44,7 +44,7 @@
<xsl:attribute name="id">lfs-8</xsl:attribute>
<xsl:text>&#xA; </xsl:text>
<name>LFS Chapter 8</name>
<xsl:apply-templates select='document($lfs-full)//chapter[@id="chapter-bootable"]/sect1/sect1info[./productname="linux"]'/>
<xsl:apply-templates select='document($lfs-full)//chapter[@id="chapter-bootable"]/sect1/sect1info[./productname="kernel"]'/>
<xsl:text>&#xA; </xsl:text>
</sublist>
<sublist>
@ -86,8 +86,7 @@
<xsl:text> </xsl:text>
<xsl:choose>
<!-- Never update linux headers -->
<xsl:when test="./productname='linux'
and ancestor::chapter[@id='chapter-building-system']"/>
<xsl:when test="./productname='linux-headers'"/>
<!-- Gcc version is taken from BLFS -->
<xsl:when test="./productname='gcc'"/>
<!-- Shadow version is taken from BLFS -->
@ -98,8 +97,7 @@
<xsl:when test="./productname='dbus'"/>
<!-- Systemd version is taken from BLFS -->
<xsl:when test="./productname='systemd'"/>
<!-- Same for python and ninja -->
<xsl:when test="./productname='ninja'"/>
<!-- Same for python3 -->
<xsl:when test="./productname='Python'"/>
<xsl:otherwise>
<package><xsl:text>&#xA; </xsl:text>

View File

@ -15,9 +15,9 @@
$package='dbus' or
$package='vim' or
$package='systemd' or
$package='ninja' or
$package='Python' or
$package='shadow'"/>
<xsl:when test="$package='kernel'">true</xsl:when>
<xsl:when test="$package='LFS-Release'">true</xsl:when>
<xsl:otherwise>
<xsl:for-each select="document($lfsbook)">
@ -35,10 +35,9 @@
$package='dbus' or
$package='vim' or
$package='systemd' or
$package='ninja' or
$package='Python' or
$package='shadow'"/>
<xsl:when test="$package='linux'">
<xsl:when test="$package='kernel'">
<xsl:for-each select="document($lfsbook)">
<xsl:apply-templates select="key('idlfs',$package)[ancestor::chapter/@id='chapter-bootable']" mode="lfs"/>
</xsl:for-each>

View File

@ -71,15 +71,15 @@
</xsl:variable>
<!-- simple instructions for removing .la files. -->
<!-- We'll use the rule that any text output begins with a linefeed if needed
so that we do not need to output one at the end-->
<xsl:variable name="la-files-instr">
for libdir in /lib /usr/lib $(find /opt -name lib); do
find $libdir -name \*.la \
! -path \*ImageMagick\* \
-delete
done
</xsl:variable>
done</xsl:variable>
<xsl:variable name="list-stat-norm"
select="concat(' ', normalize-space($list-stat),' ')"/>
@ -103,6 +103,11 @@ done
<xsl:template match="sect1">
<!-- Are stat requested for this page? -->
<xsl:variable name="want-stats"
select="contains($list-stat-norm,
concat(' ',@id,' '))"/>
<!-- The file names -->
<xsl:variable name="filename" select="@id"/>
@ -138,27 +143,28 @@ done
<xsl:text>#!/bin/bash
set -e
unset MAKELEVEL
<!-- the above is needed for some packages -->
</xsl:text>
<!-- the above is needed for some packages -->
<xsl:choose>
<!-- Package page -->
<xsl:when test="sect2[@role='package']">
<!-- We build in a subdirectory, whose name may be needed
if using package management (see envars.conf), so
"export" it -->
<xsl:text>export JH_PKG_DIR=</xsl:text>
<xsl:text>
export JH_PKG_DIR=</xsl:text>
<xsl:value-of select="$filename"/>
<xsl:text>
SRC_DIR=${JH_SRC_ARCHIVE}${JH_SRC_SUBDIRS:+/${JH_PKG_DIR}}
BUILD_DIR=${JH_BUILD_ROOT}${JH_BUILD_SUBDIRS:+/${JH_PKG_DIR}}
mkdir -p $SRC_DIR
mkdir -p $BUILD_DIR
</xsl:text>
<!-- If stats are requested, include some definitions and intitializations -->
<xsl:if test="contains($list-stat-norm,concat(' ',@id,' '))">
<xsl:text>INFOLOG=$(pwd)/info-${JH_PKG_DIR}
<xsl:if test="$want-stats">
<xsl:text>
INFOLOG=$(pwd)/info-${JH_PKG_DIR}
TESTLOG=$(pwd)/test-${JH_PKG_DIR}
unset MAKEFLAGS
#MAKEFLAGS=-j4
@ -166,41 +172,47 @@ echo MAKEFLAGS: $MAKEFLAGS > $INFOLOG
: > $TESTLOG
PKG_DEST=${BUILD_DIR}/dest
rm -rf $PKG_DEST
</xsl:text>
</xsl:if>
<!-- Download code and build commands -->
<xsl:apply-templates select="sect2"/>
<xsl:apply-templates select="sect2">
<xsl:with-param name="want-stats" select="$want-stats"/>
</xsl:apply-templates>
<!-- Clean-up -->
<xsl:text>cd $BUILD_DIR
<xsl:text>
cd $BUILD_DIR
[[ -n "$JH_KEEP_FILES" ]] || </xsl:text>
<!-- In some case, some files in the build tree are owned
by root -->
<xsl:if test="$sudo='y'">
<xsl:text>sudo </xsl:text>
</xsl:if>
<xsl:text>rm -rf $JH_UNPACKDIR unpacked&#xA;&#xA;</xsl:text>
<xsl:text>rm -rf $JH_UNPACKDIR unpacked
</xsl:text>
</xsl:when>
<!-- Non-package page -->
<xsl:otherwise>
<xsl:apply-templates select=".//screen" mode="not-pack"/>
</xsl:otherwise>
</xsl:choose>
<xsl:text>exit</xsl:text>
<xsl:text>
exit
</xsl:text><!-- include a \n at the end of document-->
</exsl:document>
</xsl:template>
<!--======================= Sub-sections code =======================-->
<xsl:template match="sect2">
<xsl:param name="want-stats" select="false"/>
<xsl:choose>
<xsl:when test="@role = 'package'">
<xsl:text>cd $SRC_DIR
</xsl:text>
<xsl:text>
cd $SRC_DIR</xsl:text>
<!-- Download information is in bridgehead tags -->
<xsl:apply-templates select="bridgehead[@renderas='sect3']"/>
<xsl:text>&#xA;</xsl:text>
</xsl:when><!-- @role="package" -->
<xsl:when test="@role = 'qt4-prefix' or @role = 'qt5-prefix'">
@ -215,16 +227,16 @@ find . -maxdepth 1 -mindepth 1 -type d | xargs </xsl:text>
<xsl:text>sudo </xsl:text>
</xsl:if>
<xsl:text>rm -rf
</xsl:text>
<!-- If stats are requested, insert the start size -->
<xsl:if test="contains($list-stat-norm,concat(' ',../@id,' '))">
<xsl:text>echo Start Size: $(sudo du -skx --exclude home /) >> $INFOLOG
<!-- If stats are requested, insert the start size -->
<xsl:if test="$want-stats">
<xsl:text>
echo Start Size: $(sudo du -skx --exclude home /) >> $INFOLOG
</xsl:text>
</xsl:if>
<xsl:text>case $PACKAGE in
<xsl:text>
case $PACKAGE in
*.tar.gz|*.tar.bz2|*.tar.xz|*.tgz|*.tar.lzma)
tar -xvf $SRC_DIR/$PACKAGE &gt; unpacked
JH_UNPACKDIR=`grep '[^./]\+' unpacked | head -n1 | sed 's@^\./@@;s@/.*@@'`
@ -247,16 +259,19 @@ find . -maxdepth 1 -mindepth 1 -type d | xargs </xsl:text>
JH_UNPACKDIR=$JH_PKG_DIR-build
mkdir $JH_UNPACKDIR
cp $SRC_DIR/$PACKAGE $JH_UNPACKDIR
cp $(find . -mindepth 1 -maxdepth 1 -type l) $JH_UNPACKDIR
ADDITIONAL="$(find . -mindepth 1 -maxdepth 1 -type l)"
if [ -n "$ADDITIONAL" ]; then
cp $ADDITIONAL $JH_UNPACKDIR
fi
;;
esac
export JH_UNPACKDIR
cd $JH_UNPACKDIR&#xA;
cd $JH_UNPACKDIR
</xsl:text>
<!-- If stats are requested, insert the start time -->
<xsl:if test="contains($list-stat-norm,concat(' ',../@id,' '))">
<xsl:text>echo Start Time: ${SECONDS} >> $INFOLOG
<!-- If stats are requested, insert the start time -->
<xsl:if test="$want-stats">
<xsl:text>
echo Start Time: ${SECONDS} >> $INFOLOG
</xsl:text>
</xsl:if>
@ -264,14 +279,19 @@ cd $JH_UNPACKDIR&#xA;
mode="installation"
select=".//screen[not(@role = 'nodump') and ./userinput] |
.//para/command[contains(text(),'check') or
contains(text(),'test')]"/>
contains(text(),'test')]">
<xsl:with-param name="want-stats" select="$want-stats"/>
</xsl:apply-templates>
<xsl:text>
</xsl:text>
<xsl:if test="$sudo = 'y'">
<xsl:text>sudo /sbin/</xsl:text>
</xsl:if>
<xsl:text>ldconfig&#xA;&#xA;</xsl:text>
<xsl:text>ldconfig</xsl:text>
</xsl:when><!-- @role="installation" -->
<xsl:when test="@role = 'configuration'">
<xsl:text>&#xA;</xsl:text>
<xsl:apply-templates mode="config"
select=".//screen[not(@role = 'nodump') and ./userinput]"/>
</xsl:when><!-- @role="configuration" -->
@ -367,24 +387,24 @@ cd $JH_UNPACKDIR&#xA;
<xsl:value-of select="$varname"/>
<xsl:text>
fi
fi
</xsl:text>
fi</xsl:text>
<xsl:if test="string-length($md5) &gt; 10">
<xsl:text>echo "</xsl:text>
<xsl:text>
echo "</xsl:text>
<xsl:value-of select="$md5"/>
<xsl:text>&#x20;&#x20;$</xsl:text>
<xsl:value-of select="$varname"/>
<xsl:text>" | md5sum -c -
</xsl:text>
<xsl:text>" | md5sum -c -</xsl:text>
</xsl:if>
<!-- link additional packages into $BUILD_DIR, because they are supposed to
be there-->
<xsl:if test="string($varname) != 'PACKAGE'">
<xsl:text>[[ "$SRC_DIR" != "$BUILD_DIR" ]] &amp;&amp; ln -sf $SRC_DIR/$</xsl:text>
<xsl:text>
[[ "$SRC_DIR" != "$BUILD_DIR" ]] &amp;&amp; ln -sf $SRC_DIR/$</xsl:text>
<xsl:value-of select="$varname"/>
<xsl:text> $BUILD_DIR
</xsl:text>
<xsl:text> $BUILD_DIR</xsl:text>
</xsl:if>
<xsl:text>&#xA;</xsl:text>
</xsl:template>
<!-- Extract the MD5 sum information -->
@ -545,7 +565,6 @@ EOF
<xsl:call-template name="begin-root"/>
</xsl:if>
<xsl:apply-templates mode="root"/>
<xsl:text>&#xA;</xsl:text>
<xsl:if test="not(following-sibling::screen[1][@role='root'])">
<xsl:call-template name="end-root"/>
</xsl:if>
@ -553,7 +572,6 @@ EOF
<!-- then all the instructions run as user -->
<xsl:otherwise>
<xsl:apply-templates select="userinput"/>
<xsl:text>&#xA;</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
@ -561,9 +579,11 @@ EOF
<xsl:template name="set-bootpkg-dir">
<xsl:param name="bootpkg" select="'bootscripts'"/>
<xsl:param name="url" select="''"/>
<xsl:text>BOOTPKG_DIR=blfs-</xsl:text>
<xsl:text>
BOOTPKG_DIR=blfs-</xsl:text>
<xsl:copy-of select="$bootpkg"/>
<xsl:text>
BOOTSRC_DIR=${JH_SRC_ARCHIVE}${JH_SRC_SUBDIRS:+/${BOOTPKG_DIR}}
BOOTBUILD_DIR=${JH_BUILD_ROOT}${JH_BUILD_SUBDIRS:+/${BOOTPKG_DIR}}
mkdir -p $BOOTSRC_DIR
@ -594,16 +614,15 @@ else
tar -xvf $BOOTSRC_DIR/$BOOTPACKG > unpacked
BOOTUNPACKDIR=`head -n1 unpacked | sed 's@^./@@;s@/.*@@'`
fi
cd $BOOTUNPACKDIR
</xsl:text>
cd $BOOTUNPACKDIR</xsl:text>
</xsl:template>
<xsl:template match="screen" mode="config">
<xsl:if test="preceding-sibling::para[1]/xref[@linkend='bootscripts']">
<!-- if the preceding "screen" tag is role="root", and we are role="root"
the end-root has not been called. So do it -->
<xsl:if test="preceding-sibling::screen[1][@role='root'] and
@role='root'">
<xsl:if
test="preceding-sibling::screen[1][@role='root'] and @role='root'">
<xsl:call-template name="end-root"/>
</xsl:if>
<xsl:call-template name="set-bootpkg-dir">
@ -613,16 +632,16 @@ cd $BOOTUNPACKDIR
</xsl:call-template>
<!-- if the preceding "screen" tag is role="root", and we are role="root"
the begin-root will not be called. So do it -->
<xsl:if test="preceding-sibling::screen[1][@role='root'] and
@role='root'">
<xsl:if
test="preceding-sibling::screen[1][@role='root'] and @role='root'">
<xsl:call-template name="begin-root"/>
</xsl:if>
</xsl:if>
<xsl:if test="preceding-sibling::para[1]/xref[@linkend='systemd-units']">
<!-- if the preceding "screen" tag is role="root", and we are role="root"
the end-root has not been called. So do it -->
<xsl:if test="preceding-sibling::screen[1][@role='root'] and
@role='root'">
<xsl:if
test="preceding-sibling::screen[1][@role='root'] and @role='root'">
<xsl:call-template name="end-root"/>
</xsl:if>
<xsl:call-template name="set-bootpkg-dir">
@ -632,8 +651,8 @@ cd $BOOTUNPACKDIR
</xsl:call-template>
<!-- if the preceding "screen" tag is role="root", and we are role="root"
the begin-root will not be called. So do it -->
<xsl:if test="preceding-sibling::screen[1][@role='root'] and
@role='root'">
<xsl:if
test="preceding-sibling::screen[1][@role='root'] and @role='root'">
<xsl:call-template name="begin-root"/>
</xsl:if>
</xsl:if>
@ -642,22 +661,23 @@ cd $BOOTUNPACKDIR
@linkend='systemd-units']">
<!-- if the next "screen" tag is role="root", and we are role="root"
the end-root has not been called. So do it -->
<xsl:if test="following-sibling::screen[1][@role='root'] and
@role='root'">
<xsl:if
test="following-sibling::screen[1][@role='root'] and @role='root'">
<xsl:call-template name="end-root"/>
</xsl:if>
<xsl:text>popd
</xsl:text>
<xsl:text>
popd</xsl:text>
<!-- if the next "screen" tag is role="root", and we are role="root"
the begin-root will not be called. So do it -->
<xsl:if test="following-sibling::screen[1][@role='root'] and
@role='root'">
<xsl:if
test="following-sibling::screen[1][@role='root'] and @role='root'">
<xsl:call-template name="begin-root"/>
</xsl:if>
</xsl:if>
</xsl:template>
<xsl:template match="command" mode="installation">
<xsl:param name="want-stats" select="false"/>
<xsl:variable name="ns" select="normalize-space(string())"/>
<xsl:variable name="first"
select="not(
@ -670,10 +690,10 @@ cd $BOOTUNPACKDIR
following-sibling::command[contains(text(),'check') or
contains(text(),'test')]))"/>
<xsl:choose>
<xsl:when test="contains($list-stat-norm,
concat(' ',ancestor::sect1/@id,' '))">
<xsl:when test="$want-stats">
<xsl:if test="$first">
<xsl:text>
echo Time after make: ${SECONDS} >> $INFOLOG
echo Size after make: $(sudo du -skx --exclude home /) >> $INFOLOG
echo Time before test: ${SECONDS} >> $INFOLOG
@ -682,7 +702,8 @@ echo Time before test: ${SECONDS} >> $INFOLOG
</xsl:if>
</xsl:when>
<xsl:otherwise>
<xsl:text>#</xsl:text>
<xsl:text>
#</xsl:text>
</xsl:otherwise>
</xsl:choose>
<xsl:choose>
@ -698,26 +719,32 @@ echo Time before test: ${SECONDS} >> $INFOLOG
<xsl:copy-of select="$ns"/>
</xsl:otherwise>
</xsl:choose>
<xsl:if test="contains($list-stat-norm,
concat(' ',ancestor::sect1/@id,' '))">
<xsl:if test="$want-stats">
<xsl:text> &gt;&gt; $TESTLOG 2&gt;&amp;1</xsl:text>
</xsl:if>
<xsl:text> || true&#xA;</xsl:text>
<xsl:if test="contains($list-stat-norm,
concat(' ',ancestor::sect1/@id,' ')) and $last">
<xsl:text> || true</xsl:text>
<xsl:if test="$want-stats">
<xsl:text>
echo Time after test: ${SECONDS} >> $INFOLOG
echo Size after test: $(sudo du -skx --exclude home /) >> $INFOLOG
echo Time before install: ${SECONDS} >> $INFOLOG
</xsl:text>
</xsl:if>
</xsl:template>
<xsl:template match="userinput">
<xsl:text>
</xsl:text>
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="userinput" mode="root">
<xsl:text>
</xsl:text>
<xsl:apply-templates mode="root"/>
</xsl:template>
<xsl:template match="text()">
<xsl:call-template name="remove-ampersand">
<xsl:with-param name="out-string" select="string()"/>
@ -733,17 +760,6 @@ echo Time before install: ${SECONDS} >> $INFOLOG
<xsl:template name="output-root">
<xsl:param name="out-string" select="''"/>
<xsl:choose>
<xsl:when test="contains($out-string,'make ')">
<xsl:call-template name="output-root">
<xsl:with-param name="out-string"
select="substring-before($out-string,'make ')"/>
</xsl:call-template>
<xsl:text>make -j1 </xsl:text>
<xsl:call-template name="output-root">
<xsl:with-param name="out-string"
select="substring-after($out-string,'make ')"/>
</xsl:call-template>
</xsl:when>
<xsl:when test="contains($out-string,'$') and $sudo = 'y'">
<xsl:call-template name="output-root">
<xsl:with-param name="out-string"
@ -851,6 +867,7 @@ echo Time before install: ${SECONDS} >> $INFOLOG
select="userinput|following-sibling::screen[@role='root']/userinput"
mode="destdir"/>
<xsl:text>
echo Time after install: ${SECONDS} >> $INFOLOG
echo Size after install: $(sudo du -skx --exclude home /) >> $INFOLOG
</xsl:text>
@ -873,7 +890,6 @@ echo Size after install: $(sudo du -skx --exclude home /) >> $INFOLOG
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>
<xsl:text>&#xA;</xsl:text>
</xsl:template>
<xsl:template name="outputpkgdest">
@ -894,7 +910,8 @@ echo Size after install: $(sudo du -skx --exclude home /) >> $INFOLOG
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:text>make DESTDIR=$PKG_DEST</xsl:text>
<xsl:text>
make DESTDIR=$PKG_DEST</xsl:text>
<xsl:call-template name="outputpkgdest">
<xsl:with-param
name="outputstring"
@ -918,7 +935,8 @@ echo Size after install: $(sudo du -skx --exclude home /) >> $INFOLOG
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:text>DESTDIR=$PKG_DEST ninja</xsl:text>
<xsl:text>
DESTDIR=$PKG_DEST ninja</xsl:text>
<xsl:call-template name="outputpkgdest">
<xsl:with-param
name="outputstring"
@ -984,7 +1002,8 @@ echo Size after install: $(sudo du -skx --exclude home /) >> $INFOLOG
contains($instruction-before,'pgrep -l')">
<xsl:text> &amp;&amp;</xsl:text>
</xsl:if>
<xsl:text>&#xA;</xsl:text>
<xsl:text>
</xsl:text>
<xsl:call-template name="remove-ampersand">
<xsl:with-param name="out-string"
select="substring-after($out-string,
@ -1016,17 +1035,18 @@ echo Size after install: $(sudo du -skx --exclude home /) >> $INFOLOG
<xsl:template name="remove-end-space">
<xsl:param name="instructions" select="''"/>
<xsl:choose>
<xsl:when test="contains($instructions,'&#xA;')">
<xsl:copy-of select="substring-before($instructions,'&#xA;')"/>
<xsl:text>&#xA;</xsl:text>
<xsl:when
test="substring($instructions,string-length($instructions))=' '">
<xsl:call-template name="remove-end-space">
<xsl:with-param
name="instructions"
select="substring-after($instructions,'&#xA;')"/>
select="substring($instructions,
1,
string-length($instructions)-1)"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:copy-of select="normalize-space($instructions)"/>
<xsl:copy-of select="$instructions"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>

View File

@ -1,4 +1,4 @@
# $Id:
# $Id$
# From the Build Scripts Written By: Jim Gifford <lfs@jg555.com>
# Modified By: Joe Ciccone <jciccone@linuxfromscratch.org
# Additional changes: George Boudreau <georgeb@linuxfromscratch.org>

View File

@ -37,6 +37,10 @@ case $1 in
local PACKENT=$(dirname $JH_PACK_INSTALL)/blfs-xml/packages.ent
VERSION=$(sed -n 's/.*flashplayer[^0-9]*\([^"]*\).*/\1/p' $PACKENT)
;;
pax*)
local PACKENT=$(dirname $JH_PACK_INSTALL)/blfs-xml/packages.ent
VERSION=$(sed -n 's/.*pax[^0-9]*\([^"]*\).*/\1/p' $PACKENT)
;;
psutils*)
local PACKENT=$(dirname $JH_PACK_INSTALL)/blfs-xml/packages.ent
VERSION=$(sed -n 's/.*psutils[^0-9]*\([^"]*\).*/\1/p' $PACKENT)

View File

@ -1,5 +1,5 @@
<!-- $Id$ -->
<?xml version="1.0" encoding="UTF-8"?>
<!-- $Id$ -->
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
<!ENTITY porg-version "0.10">