r3886 - in jhalfs/branches/new_features/BLFS: . xsl

pierre at higgs.linuxfromscratch.org pierre at higgs.linuxfromscratch.org
Mon Feb 27 06:02:16 PST 2017


Author: pierre
Date: Mon Feb 27 06:02:16 2017
New Revision: 3886

Log:
Fix the BLFS tools for the "Xorg Legacy" page

Modified:
   jhalfs/branches/new_features/BLFS/gen-special.sh
   jhalfs/branches/new_features/BLFS/xsl/make_book.xsl

Modified: jhalfs/branches/new_features/BLFS/gen-special.sh
==============================================================================
--- jhalfs/branches/new_features/BLFS/gen-special.sh	Mon Feb 27 06:00:04 2017	(r3885)
+++ jhalfs/branches/new_features/BLFS/gen-special.sh	Mon Feb 27 06:02:16 2017	(r3886)
@@ -39,7 +39,7 @@
 
 # Non-versioned packages:
 NV_LIST="cacerts xorg-env kde-pre-install-config kf5-intro lxqt-pre-install \
-ojdk-conf tex-path"
+lxqt-post-install ojdk-conf tex-path"
 
 # Set PATH to be sure to find udevadm
 SAVPATH=$PATH
@@ -146,7 +146,7 @@
 # that the preceding package is a dependency of the following,
 # except the first.
   list_cat="$(sed -n '/>cat/,/EOF</p' $file | grep -v 'cat\|EOF' |
-                 sed 's/^[^ ]*\ *\([^&]*\).*/\1/' | sed 's/-$//')"
+              awk '{ print $NF }' | sed 's/-&.*//')"
 
 # Rationale for the sed below: the following for breaks words at spaces (unless
 # we tweak IFS). So replace spaces with commas in lines so that only newlines

Modified: jhalfs/branches/new_features/BLFS/xsl/make_book.xsl
==============================================================================
--- jhalfs/branches/new_features/BLFS/xsl/make_book.xsl	Mon Feb 27 06:00:04 2017	(r3885)
+++ jhalfs/branches/new_features/BLFS/xsl/make_book.xsl	Mon Feb 27 06:02:16 2017	(r3886)
@@ -307,6 +307,13 @@
                         select=".//userinput[starts-with(string(),'cat ')]"/>
       </xsl:call-template>
     </xsl:variable>
+    <xsl:variable name="download-dir">
+      <xsl:call-template name="download-dir">
+        <xsl:with-param name="package" select="concat(' ',$package,'-')"/>
+        <xsl:with-param name="cat-md5"
+                        select=".//userinput[starts-with(string(),'cat ')]"/>
+      </xsl:call-template>
+    </xsl:variable>
     <xsl:variable name="install-instructions">
       <xsl:call-template name="inst-instr">
         <xsl:with-param name="inst-instr"
@@ -328,6 +335,7 @@
               <xsl:attribute name="url">
                 <xsl:value-of
                    select=".//para[contains(string(),'(HTTP)')]/ulink/@url"/>
+                <xsl:value-of select="$download-dir"/>
                 <xsl:value-of select="$tarball"/>
               </xsl:attribute>
              </xsl:element>
@@ -338,6 +346,7 @@
               <xsl:attribute name="url">
                 <xsl:value-of
                    select=".//para[contains(string(),'(FTP)')]/ulink/@url"/>
+                <xsl:value-of select="$download-dir"/>
                 <xsl:value-of select="$tarball"/>
               </xsl:attribute>
              </xsl:element>
@@ -407,9 +416,43 @@
                           select="substring-after($cat-md5,'&#xA;')"/>
         </xsl:call-template>
       </xsl:when>
+      <xsl:when test="contains(substring-before($cat-md5,$package),' ')">
+        <xsl:call-template name="tarball">
+          <xsl:with-param name="package" select="$package"/>
+          <xsl:with-param name="cat-md5"
+                          select="substring-after($cat-md5,' ')"/>
+        </xsl:call-template>
+      </xsl:when>
       <xsl:otherwise>
         <xsl:copy-of select="substring-after(
-                                 substring-before($cat-md5,'&#xA;'),'  ')"/>
+                                substring-before($cat-md5,'&#xA;'),' ')"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+<!-- get the download dirname from the text that comes from the .md5 file -->
+  <xsl:template name="download-dir">
+    <xsl:param name="package"/>
+    <xsl:param name="cat-md5"/>
+    <xsl:choose>
+      <xsl:when test="not(@id='xorg7-legacy')">
+        <xsl:copy-of select="''"/>
+      </xsl:when>
+      <xsl:when test="contains(substring-before($cat-md5,$package),'&#xA;')">
+        <xsl:call-template name="download-dir">
+          <xsl:with-param name="package" select="$package"/>
+          <xsl:with-param name="cat-md5"
+                          select="substring-after($cat-md5,'&#xA;')"/>
+        </xsl:call-template>
+      </xsl:when>
+      <xsl:when test="contains(substring-before($cat-md5,$package),' ')">
+        <xsl:call-template name="download-dir">
+          <xsl:with-param name="package" select="$package"/>
+          <xsl:with-param name="cat-md5"
+                          select="substring-after($cat-md5,' ')"/>
+        </xsl:call-template>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:copy-of select="substring-before($cat-md5,' ')"/>
       </xsl:otherwise>
     </xsl:choose>
   </xsl:template>


More information about the alfs-log mailing list