HLFS: Select the proper kernel package for packages list and download.

This commit is contained in:
Manuel Canales Esparcia 2007-06-03 10:54:07 +00:00
parent 5c575e1b8c
commit 139c34e855
4 changed files with 23 additions and 4 deletions

View file

@ -118,7 +118,7 @@ extract_commands() { #
;;
hlfs)
echo -n " ${L_arrow}${BOLD}$MODEL${R_arrow} HLFS libc implementation... "
echo -n " ${L_arrow}${BOLD}$MODEL + $KERNEL${R_arrow} HLFS flavour... "
xsltproc --nonet \
--xinclude \
--stringparam model $MODEL \
@ -177,7 +177,10 @@ create_package_list() { #
$BOOK/materials/${ARCH}-chapter.xml >>$LOGDIR/$LOG 2>&1
;;
hlfs)
xsltproc --nonet --xinclude -o pkg_tarball_list packages.xsl \
xsltproc --nonet --xinclude
--stringparam model $MODEL \
--stringparam kernel $KERNEL \
-o pkg_tarball_list packages.xsl \
$BOOK/chapter04/chapter04.xml >>$LOGDIR/$LOG 2>&1
;;
lfs)

View file

@ -160,11 +160,12 @@ create_urls() { #
echo " ...OK"
;;
hlfs)
echo -n "Creating HLFS <${MODEL}> specific URLs file"
echo -n "Creating HLFS <${MODEL}> + <${KERNEL}> specific URLs file"
xsltproc --nonet --xinclude \
--stringparam server $SERVER \
--stringparam family lfs \
--stringparam model $MODEL \
--stringparam kernel $KERNEL \
-o $BUILDDIR/sources/urls.lst urls.xsl \
$BOOK/chapter04/chapter04.xml >>$LOGDIR/$LOG 2>&1
echo " ...OK"

View file

@ -7,12 +7,22 @@
<xsl:output method="text"/>
<!-- The libc model used for HLFS -->
<xsl:param name="model" select="glibc"/>
<!-- The kernel series used for HLFS -->
<xsl:param name="kernel" select="2.6"/>
<xsl:template match="/">
<xsl:apply-templates select="//para"/>
</xsl:template>
<xsl:template match="para">
<xsl:if test="contains(string(),'Download:')">
<xsl:if test="contains(string(),'Download:') and
(ancestor::varlistentry[@condition=$model]
or not(ancestor::varlistentry[@condition])) and
(ancestor::varlistentry[@vendor=$kernel]
or not(ancestor::varlistentry[@vendor]))">
<xsl:call-template name="package_name">
<xsl:with-param name="url" select="ulink/@url"/>
</xsl:call-template>

View file

@ -16,6 +16,9 @@
<!-- The libc model used for HLFS -->
<xsl:param name="model" select="glibc"/>
<!-- The kernel series used for HLFS -->
<xsl:param name="kernel" select="2.6"/>
<xsl:template match="/">
<xsl:apply-templates select="//ulink"/>
</xsl:template>
@ -26,6 +29,8 @@
duplicated URLs due that may be splitted for PDF output -->
<xsl:if test="(ancestor::varlistentry[@condition=$model]
or not(ancestor::varlistentry[@condition])) and
(ancestor::varlistentry[@vendor=$kernel]
or not(ancestor::varlistentry[@vendor])) and
(contains(@url, '.bz2') or contains(@url, '.tar.gz') or
contains(@url, '.tgz') or contains(@url, '.patch')) and
not(ancestor-or-self::*/@condition = 'pdf')">