Changeset 0ad3a33


Ignore:
Timestamp:
03/27/2017 09:40:41 AM (7 years ago)
Author:
Pierre Labastie <pierre@…>
Branches:
2.4, ablfs-more, legacy, trunk
Children:
1814367
Parents:
c67990f
Message:

When choosing the LFS book, we should not depend on docbook-xml. This is achieved by directly treating the revision attribute in lfs.xsl, instead of using profiling from docbook-xsl.

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • LFS/lfs.xsl

    rc67990f r0ad3a33  
    88      extension-element-prefixes="exsl"
    99      version="1.0">
     10
     11  <!-- which revision attribute to include: can only be sysv or systemd,
     12       but we leave checking to the caller-->
     13  <xsl:param name="revision" select="'sysv'"/>
    1014
    1115  <!-- use package management ?
     
    4549 
    4650  <xsl:template match="/">
    47     <xsl:apply-templates select="//sect1"/>
     51    <xsl:apply-templates select="//sect1[not(@revision) or
     52                                         @revision=$revision]"/>
    4853  </xsl:template>
    4954 
     
    124129        <xsl:text>cd $PKGDIR&#xA;</xsl:text>
    125130      </xsl:if>
    126       <xsl:apply-templates select="sect2|
    127                                    screen[not(@role) or
    128                                           @role!='nodump']/userinput"/>
     131      <xsl:apply-templates select="sect2[not(@revision) or
     132                                         @revision=$revision] |
     133                                   screen[(not(@role) or
     134                                           @role!='nodump') and
     135                                          (not(@revision) or
     136                                           @revision=$revision)]/userinput"/>
    129137      <xsl:if test="@id='ch-system-creatingdirs' and $pkgmngt='y'">
    130138        <xsl:apply-templates
     
    149157  <xsl:template match="sect2">
    150158    <xsl:apply-templates
    151       select=".//screen[not(@role) or
    152                         @role != 'nodump']/userinput[
     159      select=".//screen[(not(@role) or
     160                         @role != 'nodump') and
     161                        (not(@revision) or
     162                         @revision=$revision)]/userinput[
    153163                             @remap = 'pre' or
    154164                             @remap = 'configure' or
     
    180190    </xsl:if>
    181191    <xsl:apply-templates
    182          select=".//screen[not(@role) or
    183                            @role != 'nodump']/userinput[@remap = 'install']"/>
     192         select=".//screen[(not(@role) or
     193                            @role != 'nodump') and
     194                           (not(@revision) or
     195                            @revision=$revision)]/userinput[@remap = 'install']"/>
    184196    <xsl:if test="ancestor::chapter[@id != 'chapter-temporary-tools'] and
    185197                  $pkgmngt = 'y' and
     
    256268    <xsl:apply-templates
    257269       select=".//screen[
    258                  not(@role) or
    259                  @role != 'nodump'
     270                (not(@role) or
     271                 @role != 'nodump') and
     272                (not(@revision) or
     273                 @revision=$revision)
    260274                        ]/userinput[
    261275                       not(@remap) or
  • common/libs/func_book_parser

    rc67990f r0ad3a33  
    151151        popd > /dev/null
    152152
    153         xsltproc --nonet                                 \
    154                  --xinclude                              \
    155                  --output /tmp/lfs-full.xml              \
    156                  --stringparam profile.revision $INITSYS \
    157                  $BOOK/stylesheets/lfs-xsl/profile.xsl   \
    158                  $BOOK/index.xml
    159 
    160153        xsltproc --nonet                                   \
     154                 --xinclude                                \
     155                 --stringparam revision       $INITSYS     \
    161156                 --stringparam testsuite      $TEST        \
    162157                 --stringparam bomb-testsuite $BOMB_TEST   \
     
    169164                 --output ./${PROGNAME}-commands/          \
    170165                 $XSL                                      \
    171                  /tmp/lfs-full.xml >>$LOGDIR/$LOG 2>&1
    172 
    173         rm /tmp/lfs-full.xml
     166                 $BOOK/index.xml
    174167      ;;
    175168    *)  echo -n " ${L_arrow}${PROGNAME}${R_arrow} book invalid, terminate build... "
Note: See TracChangeset for help on using the changeset viewer.