Use only upstream's URL in urls.lst

This commit is contained in:
Pierre Labastie 2022-05-07 11:24:06 +02:00
parent 924a237843
commit 88e5cbc258
2 changed files with 2 additions and 60 deletions

View file

@ -72,7 +72,6 @@ xEOFx
#----------------------------------#
add_CustomToolsURLS() { # Add any users supplied scripts URL information
#----------------------------------#
local BLFS_SERVER="${SERVER}/pub/blfs/conglomeration/"
local this_script
local URL PKG PKG_VERSION PKG_FILE MD5
@ -86,10 +85,10 @@ add_CustomToolsURLS() { # Add any users supplied scripts URL informat
# A cmd only script had no PKG defined
[[ "x${PKG}" = "x" ]] && continue
echo "${URL} ${BLFS_SERVER}${PKG}/${PKG_FILE} ${MD5}" >> urls.lst.tmp
echo "${URL} ${MD5}" >> urls.lst.tmp
# Add any patches..
for PATCH in PATCH{1..10}; do
[[ -n ${!PATCH} ]] && echo "dummy-url ${!PATCH} CUSTOM-PATCH-MD5SUM" >> urls.lst.tmp
[[ -n ${!PATCH} ]] && echo "${!PATCH} CUSTOM-PATCH-MD5SUM" >> urls.lst.tmp
done
done
cat urls.lst.tmp >> $BUILDDIR/sources/urls.lst

View file

@ -8,10 +8,6 @@
<!-- The FTP server used as fallback -->
<xsl:param name="server">ftp://ftp.osuosl.org</xsl:param>
<!-- The book family (lfs only now). Needed to use the proper FTP path. -->
<!-- TODO not needed, remove -->
<xsl:param name="family">lfs</xsl:param>
<!-- Do we use a package manager? -->
<xsl:param name="pkgmngt" select="'n'"/>
@ -41,16 +37,6 @@
<xsl:with-param name="url" select="@url"/>
</xsl:call-template>
</xsl:variable>
<!-- Extract the directory for that package -->
<xsl:variable name="cut"
select="translate(substring-after($package, '-'),
'0123456789', '0000000000')"/>
<xsl:variable name="package2">
<xsl:value-of select="substring-before($package, '-')"/>
<xsl:text>-</xsl:text>
<xsl:value-of select="$cut"/>
</xsl:variable>
<xsl:variable name="dirname" select="substring-before($package2, '-0')"/>
<!-- Write the upstream URLs, fixing the redirected ones -->
<xsl:choose>
<xsl:when test="contains(@url,'?')">
@ -60,49 +46,6 @@
<xsl:value-of select="@url"/>
</xsl:otherwise>
</xsl:choose>
<xsl:text> </xsl:text>
<!-- Write FTP mirror URLs -->
<xsl:value-of select="$server"/>
<xsl:text>/pub/</xsl:text>
<xsl:value-of select="$family"/>
<xsl:text>/conglomeration/</xsl:text>
<xsl:choose>
<!-- Fix some directories. Test against $dirname to be sure that we
are matching the start of a package name, not a string in a patch name
But some packages requires test against $package. -->
<xsl:when test="contains($dirname, 'bash')">
<xsl:text>bash/</xsl:text>
</xsl:when>
<xsl:when test="contains($package, 'dvhtool')">
<xsl:text>dvhtool/</xsl:text>
</xsl:when>
<xsl:when test="contains($dirname, 'gcc')">
<xsl:text>gcc/</xsl:text>
</xsl:when>
<xsl:when test="contains($dirname, 'glibc')">
<xsl:text>glibc/</xsl:text>
</xsl:when>
<xsl:when test="contains($package, 'powerpc-utils')">
<xsl:text>powerpc-utils/</xsl:text>
</xsl:when>
<xsl:when test="contains($package, 'tcl')">
<xsl:text>tcl/</xsl:text>
</xsl:when>
<xsl:when test="contains($package, 'uClibc')">
<xsl:text>uClibc/</xsl:text>
</xsl:when>
<xsl:when test="contains($dirname, 'udev')">
<xsl:text>udev/</xsl:text>
</xsl:when>
<xsl:when test="contains($dirname, 'iputils')">
<xsl:text>iputils/</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$dirname"/>
<xsl:text>/</xsl:text>
</xsl:otherwise>
</xsl:choose>
<xsl:value-of select="$package"/>
<!-- Write MD5SUM value -->
<xsl:text> </xsl:text>
<xsl:value-of select="../following-sibling::para/literal"/>