Changeset 94428c3d


Ignore:
Timestamp:
12/04/2006 10:19:31 AM (17 years ago)
Author:
Manuel Canales Esparcia <manuel@…>
Branches:
10.0, 10.0-rc1, 10.1, 10.1-rc1, 11.0, 11.0-rc1, 11.0-rc2, 11.0-rc3, 11.1, 11.1-rc1, 11.2, 11.2-rc1, 11.3, 11.3-rc1, 12.0, 12.0-rc1, 12.1, 12.1-rc1, 6.3, 6.4, 6.5, 6.6, 6.7, 6.8, 7.0, 7.1, 7.2, 7.3, 7.4, 7.5, 7.5-systemd, 7.6, 7.6-systemd, 7.7, 7.7-systemd, 7.8, 7.8-systemd, 7.9, 7.9-systemd, 8.0, 8.1, 8.2, 8.3, 8.4, 9.0, 9.1, arm, bdubbs/gcc13, ml-11.0, multilib, renodr/libudev-from-systemd, s6-init, trunk, xry111/arm64, xry111/arm64-12.0, xry111/clfs-ng, xry111/lfs-next, xry111/loongarch, xry111/loongarch-12.0, xry111/loongarch-12.1, xry111/mips64el, xry111/pip3, xry111/rust-wip-20221008, xry111/update-glibc
Children:
35c837b
Parents:
5470c67
Message:

Simplified wget-list.xsl. We need only upstream URLs in raw format.

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@7881 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

File:
1 edited

Legend:

Unmodified
Added
Removed
  • stylesheets/wget-list.xsl

    r5470c67 r94428c3d  
    11<?xml version='1.0' encoding='ISO-8859-1'?>
    22
    3 <!-- $Id$ -->
     3<!-- Create a list of upstream URLs for packages and patches to be used
     4     with wget.
     5     NOTE: there are several sourceforge URLs that don't work with wget. -->
    46
    57<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
     
    79
    810  <xsl:output method="text"/>
    9 
    10   <!-- The libc model used for HLFS -->
    11   <xsl:param name="model" select="glibc"/>
    1211
    1312  <xsl:template match="/">
     
    1918      name, the next test must be fixed to match it also. Skip possible
    2019      duplicated URLs due that may be splitted for PDF output -->
    21     <xsl:if test="(ancestor::varlistentry[@condition=$model]
    22                   or not(ancestor::varlistentry[@condition])) and
    23                   (contains(@url, '.tar.') or contains(@url, '.tgz')
     20    <xsl:if test="(contains(@url, '.tar.') or contains(@url, '.tgz')
    2421                  or contains(@url, '.patch')) and
    2522                  not(ancestor-or-self::*/@condition = 'pdf')">
    26       <!-- Extract the package name -->
    27       <xsl:variable name="package">
    28         <xsl:call-template name="package.name">
    29           <xsl:with-param name="url" select="@url"/>
    30         </xsl:call-template>
    31       </xsl:variable>
    32       <!-- Extract the directory for that package -->
    33       <xsl:variable name="cut"
    34                     select="translate(substring-after($package, '-'),
    35                     '0123456789', '0000000000')"/>
    36       <xsl:variable name="package2">
    37         <xsl:value-of select="substring-before($package, '-')"/>
    38         <xsl:text>-</xsl:text>
    39         <xsl:value-of select="$cut"/>
    40       </xsl:variable>
    41       <xsl:variable name="dirname" select="substring-before($package2, '-0')"/>
    42       <!-- Write the upstream URLs, except the redirected ones -->
    4323      <xsl:value-of select="@url"/>
    44       <xsl:text> </xsl:text>
    4524      <xsl:text>&#x0a;</xsl:text>
    4625    </xsl:if>
    4726  </xsl:template>
    4827
    49   <xsl:template name="package.name">
    50     <xsl:param name="url"/>
    51     <xsl:choose>
    52       <xsl:when test="contains($url, '/')">
    53         <xsl:call-template name="package.name">
    54           <xsl:with-param name="url" select="substring-after($url, '/')"/>
    55         </xsl:call-template>
    56       </xsl:when>
    57       <xsl:otherwise>
    58         <xsl:choose>
    59           <xsl:when test="contains($url, '?')">
    60             <xsl:value-of select="substring-before($url, '?')"/>
    61           </xsl:when>
    62           <xsl:otherwise>
    63             <xsl:value-of select="$url"/>
    64           </xsl:otherwise>
    65         </xsl:choose>
    66       </xsl:otherwise>
    67     </xsl:choose>
    68   </xsl:template>
    69 
    7028</xsl:stylesheet>
    7129
Note: See TracChangeset for help on using the changeset viewer.