Fix the BLFS tools for the "Xorg Legacy" page

This commit is contained in:
Pierre Labastie 2017-02-27 14:02:16 +00:00
parent ed4f11f2a7
commit 6c9002b012
2 changed files with 46 additions and 3 deletions

View file

@ -39,7 +39,7 @@ EXCEPTIONS=$(grep 'ENTITY.*version[ ]*"[^0-9"&.].*[0-9]' ${BLFS_DIR}/packages.en
# Non-versioned packages: # Non-versioned packages:
NV_LIST="cacerts xorg-env kde-pre-install-config kf5-intro lxqt-pre-install \ 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 # Set PATH to be sure to find udevadm
SAVPATH=$PATH SAVPATH=$PATH
@ -146,7 +146,7 @@ EOF
# that the preceding package is a dependency of the following, # that the preceding package is a dependency of the following,
# except the first. # except the first.
list_cat="$(sed -n '/>cat/,/EOF</p' $file | grep -v 'cat\|EOF' | 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 # 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 # we tweak IFS). So replace spaces with commas in lines so that only newlines

View file

@ -307,6 +307,13 @@
select=".//userinput[starts-with(string(),'cat ')]"/> select=".//userinput[starts-with(string(),'cat ')]"/>
</xsl:call-template> </xsl:call-template>
</xsl:variable> </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:variable name="install-instructions">
<xsl:call-template name="inst-instr"> <xsl:call-template name="inst-instr">
<xsl:with-param name="inst-instr" <xsl:with-param name="inst-instr"
@ -328,6 +335,7 @@
<xsl:attribute name="url"> <xsl:attribute name="url">
<xsl:value-of <xsl:value-of
select=".//para[contains(string(),'(HTTP)')]/ulink/@url"/> select=".//para[contains(string(),'(HTTP)')]/ulink/@url"/>
<xsl:value-of select="$download-dir"/>
<xsl:value-of select="$tarball"/> <xsl:value-of select="$tarball"/>
</xsl:attribute> </xsl:attribute>
</xsl:element> </xsl:element>
@ -338,6 +346,7 @@
<xsl:attribute name="url"> <xsl:attribute name="url">
<xsl:value-of <xsl:value-of
select=".//para[contains(string(),'(FTP)')]/ulink/@url"/> select=".//para[contains(string(),'(FTP)')]/ulink/@url"/>
<xsl:value-of select="$download-dir"/>
<xsl:value-of select="$tarball"/> <xsl:value-of select="$tarball"/>
</xsl:attribute> </xsl:attribute>
</xsl:element> </xsl:element>
@ -407,9 +416,43 @@ END DEBUG -->
select="substring-after($cat-md5,'&#xA;')"/> select="substring-after($cat-md5,'&#xA;')"/>
</xsl:call-template> </xsl:call-template>
</xsl:when> </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:otherwise>
<xsl:copy-of select="substring-after( <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:otherwise>
</xsl:choose> </xsl:choose>
</xsl:template> </xsl:template>