Changeset 580d773


Ignore:
Timestamp:
03/27/2017 04:26:14 PM (7 years ago)
Author:
Pierre Labastie <pierre@…>
Branches:
new_features
Children:
b9cd0ee
Parents:
90f822a
Message:

Merge trunk r3940,41

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • LFS/lfs.xsl

    r90f822a r580d773  
    1010
    1111<!-- Parameters -->
     12
     13  <!-- which revision attribute to include: can only be sysv or systemd,
     14       but we leave checking to the caller-->
     15  <xsl:param name="revision" select="'sysv'"/>
    1216
    1317  <!-- use package management ?
     
    7074
    7175  <xsl:template match="/">
    72     <xsl:apply-templates select="//sect1"/>
     76    <xsl:apply-templates select="//sect1[not(@revision) or
     77                                         @revision=$revision]"/>
    7378  </xsl:template>
    7479 
    7580  <xsl:template match="sect1">
     81<!-- Since this xsl:if tag encloses the whole template, it would
     82     be much better to transpose this condition to the select part
     83     of the "calling" apply-template. But that would change the numbering,
     84     so that it would be difficult to compare to previous versions. So for
     85     version 2.4, let us keep this -->
    7686        <xsl:if test="(../@id='chapter-temporary-tools' or
    7787                  ../@id='chapter-building-system' or
    7888                  ../@id='chapter-bootscripts' or
    7989                  ../@id='chapter-bootable') and
    80                   count(descendant::screen/userinput) &gt; 0 and
    81                   count(descendant::screen/userinput) &gt;
    82                       count(descendant::screen[@role='nodump']) and
    83                   count(descendant::screen/userinput) &gt;
    84                       count(descendant::screen/userinput[starts-with(string(),'chroot')])">
     90                  (sect2[not(@revision) or @revision=$revision]//..|.)/
     91                      screen[(not(@role) or @role != 'nodump') and
     92                             (not(@revision) or @revision=$revision)]/
     93                          userinput[not(starts-with(string(),'chroot'))]">
    8594<!-- The last condition is a hack to allow previous versions of the
    8695     book where the chroot commands did not have role="nodump".
     
    149158        <xsl:text>cd $PKGDIR&#xA;</xsl:text>
    150159      </xsl:if>
    151       <xsl:apply-templates select="sect2|
    152                                    screen[not(@role) or
    153                                           @role!='nodump']/userinput"/>
     160      <xsl:apply-templates select="sect2[not(@revision) or
     161                                         @revision=$revision] |
     162                                   screen[(not(@role) or
     163                                           @role!='nodump') and
     164                                          (not(@revision) or
     165                                           @revision=$revision)]/userinput"/>
    154166      <xsl:if test="@id='ch-system-creatingdirs' and $pkgmngt='y'">
    155167        <xsl:apply-templates
     
    174186  <xsl:template match="sect2">
    175187    <xsl:apply-templates
    176       select=".//screen[not(@role) or
    177                         @role != 'nodump']/userinput[
     188      select=".//screen[(not(@role) or
     189                         @role != 'nodump') and
     190                        (not(@revision) or
     191                         @revision=$revision)]/userinput[
    178192                             @remap = 'pre' or
    179193                             @remap = 'configure' or
     
    214228    </xsl:if>
    215229    <xsl:apply-templates
    216          select=".//screen[not(@role) or
    217                            @role != 'nodump']/userinput[@remap = 'install']"/>
     230         select=".//screen[(not(@role) or
     231                            @role != 'nodump') and
     232                           (not(@revision) or
     233                            @revision=$revision)]/userinput[@remap = 'install']"/>
    218234    <xsl:if test="ancestor::chapter[@id != 'chapter-temporary-tools'] and
    219235                  $pkgmngt = 'y' and
     
    319335    <xsl:apply-templates
    320336       select=".//screen[
    321                  not(@role) or
    322                  @role != 'nodump'
     337                (not(@role) or
     338                 @role != 'nodump') and
     339                (not(@revision) or
     340                 @revision=$revision)
    323341                        ]/userinput[
    324342                       not(@remap) or
  • common/libs/func_book_parser

    r90f822a r580d773  
    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    \
     
    179174                 --output ./${PROGNAME}-commands/           \
    180175                 $XSL                                       \
    181                  /tmp/lfs-full.xml >>$LOGDIR/$LOG 2>&1
    182 
    183         rm /tmp/lfs-full.xml
     176                 $BOOK/index.xml
    184177      ;;
    185178    *)  echo -n " ${L_arrow}${PROGNAME}${R_arrow} book invalid, terminate build... "
Note: See TracChangeset for help on using the changeset viewer.