[jhalfs] branch trunk updated: ablfs: fix libreoffice additional downloads
"Git Owner" ([email protected] via alfs-discuss Mailing List) <[email protected]> Sat, 01 Mar 2025 14:22:52 +0000
| Newsgroups | gmane.linux.lfs.automated |
|---|---|
| Message-ID | <174083897240.624.1929284751427686033@rivendell.linuxfromscratch.org> |
This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch trunk
in repository jhalfs.
The following commit(s) were added to refs/heads/trunk by this push:
new 1f4b799 ablfs: fix libreoffice additional downloads
1f4b799 is described below
commit 1f4b7998544a30edd80d1562174d9bca962874d3
Author: Pierre Labastie <[email protected]>
AuthorDate: Sat Mar 1 15:01:36 2025 +0100
ablfs: fix libreoffice additional downloads
The normal layout for additional downloads is:
<itemizedlist>
<listitem>one or more <para>'s with one containing an <ulink>
</listitem>
optionally <listitem>one or more <para>'s with one containing
"MD5"</listitem>
possibly other <listitem>s,
and start again if there are other files to download.
</itemizedlist>
But the layout for libreoffice is:
<itemizedlist>
<listitem>one or more <para>'s with one containing an <ulink>
and one containing "MD5"
</listitem>
repeated three times for each of the files to download.
There are also patches with a "normal" layout.
</itemizedlist>
This commit allows treating this last case.
---
BLFS/xsl/scripts.xsl | 22 +++++++++++++++++-----
1 file changed, 17 insertions(+), 5 deletions(-)
diff --git a/BLFS/xsl/scripts.xsl b/BLFS/xsl/scripts.xsl
index fadeac9..f923a1a 100644
--- a/BLFS/xsl/scripts.xsl
+++ b/BLFS/xsl/scripts.xsl
@@ -588,7 +588,10 @@ echo "</xsl:text>
<xsl:template match="itemizedlist" mode="additional">
<!-- The normal layout is "one listitem"<->"one url", but some devs
find amusing to have FTP and/or MD5sum listitems, or to
- enclose the download information inside a simplelist tag... -->
+ enclose the download information inside a simplelist tag...
+ We also have now only <para>'s in each listitem, one for
+ url, one for md5 and one for size (libreoffice case
+ since Nov 2024). -->
<xsl:for-each select="listitem[.//ulink]">
<xsl:choose>
<!-- hopefully, there was a HTTP line before -->
@@ -609,10 +612,19 @@ echo "</xsl:text>
para[contains(string(),'FTP')]/ulink/@url"/>
</xsl:with-param>
<xsl:with-param name="md5">
- <xsl:apply-templates
- select="following-sibling::listitem[position()<3]/
- para[contains(string(),'MD5')]"
- mode="md5"/>
+ <xsl:choose>
+ <xsl:when test="./para[contains(string(),'MD5')]">
+ <xsl:apply-templates
+ select="./para[contains(string(),'MD5')]"
+ mode="md5"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates
+ select="following-sibling::listitem[position()<3]/
+ para[contains(string(),'MD5')]"
+ mode="md5"/>
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:with-param>
<xsl:with-param name="varname">
<xsl:choose>
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
--
http://lists.linuxfromscratch.org/sympa/info/alfs-discuss
Unsubscribe: See the above information page