[alfs-log] r4011 - in jhalfs/trunk/BLFS: . xsl

pierre at higgs.linuxfromscratch.org pierre at higgs.linuxfromscratch.org
Sat Oct 7 11:48:02 PDT 2017


Author: pierre
Date: Sat Oct  7 11:48:02 2017
New Revision: 4011

Log:
Add code to account to the new role attribute in dependencies

Modified:
   jhalfs/trunk/BLFS/gen-special.sh
   jhalfs/trunk/BLFS/packdesc.dtd
   jhalfs/trunk/BLFS/xsl/gen_pkg_list.xsl

Modified: jhalfs/trunk/BLFS/gen-special.sh
==============================================================================
--- jhalfs/trunk/BLFS/gen-special.sh	Sat Oct  7 01:17:57 2017	(r4010)
+++ jhalfs/trunk/BLFS/gen-special.sh	Sat Oct  7 11:48:02 2017	(r4011)
@@ -125,6 +125,7 @@
   <xsl:template name="expand-deps">
     <xsl:param name="section"/>
     <xsl:param name="status"/>
+    <xsl:param name="build"/>
     <xsl:choose>
 EOF
 for file in $(ls ${BLFS_DIR}/x/installing/x7* | grep -v x7driver); do
@@ -178,6 +179,7 @@
       cat >>$SPECIAL_FILE << EOF
           <xsl:element name="dependency">
             <xsl:attribute name="status">required</xsl:attribute>
+            <xsl:attribute name="build">before</xsl:attribute>
             <xsl:attribute name="name">$precpack</xsl:attribute>
             <xsl:attribute name="type">ref</xsl:attribute>
           </xsl:element>
@@ -199,6 +201,9 @@
           <xsl:attribute name="status">
             <xsl:value-of select="\$status"/>
           </xsl:attribute>
+          <xsl:attribute name="build">
+            <xsl:value-of select="\$build"/>
+          </xsl:attribute>
           <xsl:attribute name="name">$packname</xsl:attribute>
           <xsl:attribute name="type">ref</xsl:attribute>
         </xsl:element>

Modified: jhalfs/trunk/BLFS/packdesc.dtd
==============================================================================
--- jhalfs/trunk/BLFS/packdesc.dtd	Sat Oct  7 01:17:57 2017	(r4010)
+++ jhalfs/trunk/BLFS/packdesc.dtd	Sat Oct  7 11:48:02 2017	(r4011)
@@ -19,5 +19,6 @@
 <!-- subdependencies of a dependency are defined for example in Perl
      modules -->
 <!ATTLIST dependency status (required|recommended|optional) "recommended"
+                     build (before|after) "before"
                      name CDATA #REQUIRED
                      type (ref|link) "ref">

Modified: jhalfs/trunk/BLFS/xsl/gen_pkg_list.xsl
==============================================================================
--- jhalfs/trunk/BLFS/xsl/gen_pkg_list.xsl	Sat Oct  7 01:17:57 2017	(r4010)
+++ jhalfs/trunk/BLFS/xsl/gen_pkg_list.xsl	Sat Oct  7 11:48:02 2017	(r4011)
@@ -305,6 +305,7 @@
             </xsl:text>
             <xsl:element name="dependency">
               <xsl:attribute name="status">required</xsl:attribute>
+              <xsl:attribute name="build">before</xsl:attribute>
               <xsl:attribute name="name">
                 <xsl:value-of select="preceding-sibling::sect1[1]/@id"/>
               </xsl:attribute>
@@ -348,6 +349,8 @@
       <xsl:choose>
 <!-- Avoid depending of myself -->
         <xsl:when test="ancestor::*[@id=current()/@linkend]"/>
+<!-- do not depend on something which is not a dependency -->
+        <xsl:when test="@role='nodep'"/>
 <!-- Call list expansion when we have an xorg7 series of packages -->
         <xsl:when test="contains(@linkend,'xorg7-')">
           <xsl:call-template name="expand-deps">
@@ -357,6 +360,12 @@
             <xsl:with-param name="status">
               <xsl:value-of select="$status"/>
             </xsl:with-param>
+            <xsl:with-param name="build">
+              <xsl:choose>
+                <xsl:when test="@role='runtime'">after</xsl:when>
+                <xsl:otherwise>before</xsl:otherwise>
+              </xsl:choose>
+            </xsl:with-param>
           </xsl:call-template>
         </xsl:when>
         <xsl:otherwise>
@@ -366,6 +375,12 @@
             <xsl:attribute name="status">
               <xsl:value-of select="$status"/>
             </xsl:attribute>
+            <xsl:attribute name="build">
+              <xsl:choose>
+                <xsl:when test="@role='runtime'">after</xsl:when>
+                <xsl:otherwise>before</xsl:otherwise>
+              </xsl:choose>
+            </xsl:attribute>
             <xsl:attribute name="name">
               <xsl:value-of select="@linkend"/>
             </xsl:attribute>
@@ -376,17 +391,29 @@
     </xsl:for-each>
 <!-- then external dependencies -->
     <xsl:for-each select=".//ulink">
-      <xsl:text>
+      <xsl:choose>
+<!-- do not depend on something which is not a dependency -->
+        <xsl:when test="@role='nodep'"/>
+        <xsl:otherwise>
+          <xsl:text>
             </xsl:text>
-      <xsl:element name="dependency">
-        <xsl:attribute name="status">
-          <xsl:value-of select="$status"/>
-        </xsl:attribute>
-        <xsl:attribute name="name">
-          <xsl:value-of select="translate(normalize-space(text()),' /,()','-----')"/>
-        </xsl:attribute>
-        <xsl:attribute name="type">link</xsl:attribute>
-      </xsl:element>
+          <xsl:element name="dependency">
+            <xsl:attribute name="status">
+              <xsl:value-of select="$status"/>
+            </xsl:attribute>
+            <xsl:attribute name="build">
+              <xsl:choose>
+                <xsl:when test="@role='runtime'">after</xsl:when>
+                <xsl:otherwise>before</xsl:otherwise>
+              </xsl:choose>
+            </xsl:attribute>
+            <xsl:attribute name="name">
+              <xsl:value-of select="translate(normalize-space(text()),' /,()','-----')"/>
+            </xsl:attribute>
+            <xsl:attribute name="type">link</xsl:attribute>
+          </xsl:element>
+        </xsl:otherwise>
+      </xsl:choose>
     </xsl:for-each>
   </xsl:template>
 
@@ -398,6 +425,7 @@
 <!-- the dep on the preceding package used to be required for python.
      It seems optional now -->
         <xsl:attribute name="status">optional</xsl:attribute>
+        <xsl:attribute name="build">before</xsl:attribute>
         <xsl:attribute name="name">
           <xsl:value-of select="preceding-sibling::listitem[1]//@linkend"/>
         </xsl:attribute>
@@ -409,7 +437,7 @@
   <xsl:template match="listitem" mode="perlmod-dep">
     <xsl:param name="glue" select="'&#xA;            '"/>
     <xsl:choose>
-     <xsl:when test="para/xref|para[@id]/ulink">
+     <xsl:when test="para/xref[not(@role) or @role != 'nodep']|para[@id]/ulink">
       <xsl:value-of select="$glue"/>
       <xsl:element name="dependency">
         <xsl:attribute name="status">
@@ -422,6 +450,13 @@
             <xsl:otherwise>required</xsl:otherwise>
           </xsl:choose>
         </xsl:attribute>
+        <xsl:attribute name="build">
+          <xsl:choose>
+            <xsl:when test="para/xref/@role='runtime'">after</xsl:when>
+            <xsl:when test="para/ulink/@role='runtime'">after</xsl:when>
+            <xsl:otherwise>before</xsl:otherwise>
+          </xsl:choose>
+        </xsl:attribute>
         <xsl:attribute name="name">
           <xsl:if test="para/xref">
             <xsl:value-of select="para/xref/@linkend"/>


More information about the alfs-log mailing list