Changeset 49f8b03 for LFS/lfs.xsl


Ignore:
Timestamp:
06/24/2020 06:26:05 AM (4 years ago)
Author:
Pierre Labastie <pierre@…>
Branches:
ablfs-more, legacy, trunk
Children:
d5a739a
Parents:
13e52a5
Message:

Fix package management for new book, and add a patch for porg

File:
1 edited

Legend:

Unmodified
Added
Removed
  • LFS/lfs.xsl

    r13e52a5 r49f8b03  
    144144      <xsl:value-of select="$position"/>
    145145    </xsl:variable>
    146     <!-- Inclusion of package manager scriptlets -->
    147     <xsl:if test="@id='ch-tools-stripping' and
    148                   $pkgmngt='y' and
    149                   $bashdir='/tools'">
    150       <xsl:apply-templates
    151         select="document('packageManager.xml')//sect1[contains(@id,'ch-tools')]"
    152         mode="pkgmngt">
    153         <xsl:with-param name="order" select="$order"/>
    154         <xsl:with-param name="dirname" select="$dirname"/>
    155       </xsl:apply-templates>
    156     </xsl:if>
    157     <xsl:if test="@id='ch-system-strippingagain' and
    158                   $pkgmngt='y' and
    159                   $bashdir='/tools'">
    160       <xsl:apply-templates
    161               select="document('packageManager.xml')//sect1[
    162                                               contains(@id,'ch-system')]"
    163               mode="pkgmngt">
    164         <xsl:with-param name="order" select="$order"/>
    165         <xsl:with-param name="dirname" select="$dirname"/>
    166       </xsl:apply-templates>
    167     </xsl:if>
    168146    <!-- Creating dirs and files -->
    169147    <exsl:document href="{$dirname}/{$order}-{$filename}" method="text">
     
    188166           select="sect2 |
    189167                   screen[not(@role) or @role!='nodump']/userinput"/>
    190       <xsl:if test="@id='ch-system-creatingdirs' and $pkgmngt='y'">
     168      <xsl:if test="contains(@id,'creatingdirs') and $pkgmngt='y'">
    191169        <xsl:apply-templates
    192170           select="document('packageManager.xml')//sect1[
     
    195173           mode="pkgmngt"/>
    196174      </xsl:if>
    197       <xsl:if test="@id='ch-system-createfiles' and $pkgmngt='y'">
     175      <xsl:if test="contains(@id,'createfiles')
     176                and $pkgmngt='y'
     177                and $bashdir='/tools'">
    198178        <xsl:apply-templates
    199179           select="document('packageManager.xml')//sect1[
     
    208188      <xsl:text>exit&#xA;</xsl:text>
    209189    </exsl:document>
     190    <!-- Inclusion of package manager scriptlets -->
     191    <xsl:if test="$pkgmngt='y' and
     192                  following-sibling::sect1[1][@id='ch-tools-stripping']">
     193      <xsl:choose>
     194        <xsl:when test="$bashdir='/tools'">
     195          <xsl:apply-templates
     196            select="document('packageManager.xml')//sect1[
     197                                              contains(@id,'ch-tools')]"
     198            mode="pkgmngt">
     199            <xsl:with-param name="order" select="$order+1"/>
     200            <xsl:with-param name="dirname" select="$dirname"/>
     201          </xsl:apply-templates>
     202        </xsl:when>
     203        <xsl:otherwise>
     204          <xsl:apply-templates
     205            select="document('packageManager.xml')//sect1[
     206                                              contains(@id,'ch-chroot')]"
     207            mode="pkgmngt">
     208            <xsl:with-param name="order" select="$order+1"/>
     209            <xsl:with-param name="dirname" select="$dirname"/>
     210          </xsl:apply-templates>
     211        </xsl:otherwise>
     212      </xsl:choose>
     213    </xsl:if>
     214    <xsl:if test="$pkgmngt='y' and
     215                  following-sibling::sect1[2][@id='ch-system-strippingagain']">
     216      <xsl:apply-templates
     217              select="document('packageManager.xml')//sect1[
     218                                              contains(@id,'ch-system')]"
     219              mode="pkgmngt">
     220        <xsl:with-param name="order" select="$order+1"/>
     221        <xsl:with-param name="dirname" select="$dirname"/>
     222      </xsl:apply-templates>
     223    </xsl:if>
    210224  </xsl:template>
    211225
     
    220234                             not(current()/../@id='ch-system-systemd')]"/>
    221235    <xsl:if
    222          test="ancestor::chapter[@id != 'chapter-temporary-tools'] and
     236         test="ancestor::chapter[@id = 'chapter-building-system' or
     237                                 @id = 'chapter-config'          or
     238                                 @id = 'chapter-bootable'] and
    223239               $pkgmngt = 'y' and
    224240               descendant::screen[not(@role) or
     
    247263         select=".//screen[not(@role) or @role != 'nodump']/
    248264                       userinput[@remap = 'install']"/>
    249     <xsl:if test="ancestor::chapter[@id != 'chapter-temporary-tools'] and
     265    <xsl:if test="ancestor::chapter[@id = 'chapter-building-system' or
     266                                    @id = 'chapter-config'          or
     267                                    @id = 'chapter-bootable'] and
    250268                  descendant::screen[not(@role) or
    251269                                     @role != 'nodump']/userinput[
     
    368386                            @role != 'nodump']/userinput[@remap != 'adjust']"
    369387           mode="pkgmngt"/>
    370         <xsl:if test="$dirname = 'chapter06'">
     388        <xsl:if test="$dirname = 'chapter06' or $dirname = 'chapter08'">
    371389          <xsl:text>PREV_SEC=${SECONDS}
    372390packInstall
     
    12171235        <xsl:with-param name="path" select=".//sect1info/address/text()"/>
    12181236      </xsl:call-template>
    1219       <xsl:if test = "( ../@id != 'chapter-temporary-tools' or
    1220                       starts-with(@id,'ch-system') ) and $pkgmngt = 'y'">
     1237      <xsl:if test = "( ../@id = 'chapter-building-system' or
     1238                        ../@id = 'chapter-config'         or
     1239                        ../@id = 'chapter-bootable'       or
     1240                        starts-with(@id,'ch-system') ) and $pkgmngt = 'y'">
     1241<!-- the last alternative for old books where some sections in
     1242     chapter-config had ch-system -->
    12211243        <xsl:text>
    12221244source ${ROOT}${SCRIPT_ROOT}/packInstall.sh
Note: See TracChangeset for help on using the changeset viewer.