Allow to store version of -pass1 packages
With the new way of treating dependencies, we need to properly manage -pass1 packages: For that we need the installed version of -pass1 packages. But it is recorded nowhere. packages.xml shouldn't be used for that, because it is directly built from the book dependencies: adding -pass1 packages would just duplicate the dependency information. So the version has to be recorded in the tracking file. This involves changing bump.xsl (this commit), and passing the tracking file to gen_pkg_book (next commit).
This commit is contained in:
parent
f9a7f8ec34
commit
a6fbc65357
1 changed files with 17 additions and 6 deletions
|
@ -7,15 +7,26 @@
|
||||||
<xsl:param name="package" select="''"/>
|
<xsl:param name="package" select="''"/>
|
||||||
<xsl:param name="version" select="'N'"/>
|
<xsl:param name="version" select="'N'"/>
|
||||||
|
|
||||||
|
<xsl:variable name="realpackage">
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="contains($package, '-pass1')">
|
||||||
|
<xsl:copy-of select="substring-before($package, '-pass1')"/>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:copy-of select="$package"/>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:variable>
|
||||||
|
|
||||||
<xsl:variable name="vers">
|
<xsl:variable name="vers">
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="$version='N'">
|
<xsl:when test="$version='N'">
|
||||||
<xsl:value-of select=
|
<xsl:value-of select=
|
||||||
"document($packages)//*[self::package or self::module]
|
"document($packages)//*[self::package or self::module]
|
||||||
[string(name)=$package]/version"/>
|
[string(name)=$realpackage]/version"/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<xsl:value-of select="$version"/>
|
<xsl:copy-of select="$version"/>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
</xsl:variable>
|
</xsl:variable>
|
||||||
|
@ -31,8 +42,8 @@
|
||||||
<xsl:apply-templates select=".//package"/>
|
<xsl:apply-templates select=".//package"/>
|
||||||
<xsl:if test="not(.//package[string(name)=$package])">
|
<xsl:if test="not(.//package[string(name)=$package])">
|
||||||
<package>
|
<package>
|
||||||
<name><xsl:value-of select="$package"/></name>
|
<name><xsl:copy-of select="$package"/></name>
|
||||||
<version><xsl:value-of select="$vers"/></version>
|
<version><xsl:copy-of select="$vers"/></version>
|
||||||
</package>
|
</package>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
</sublist>
|
</sublist>
|
||||||
|
@ -42,8 +53,8 @@
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="string(name)=$package">
|
<xsl:when test="string(name)=$package">
|
||||||
<package>
|
<package>
|
||||||
<name><xsl:value-of select="name"/></name>
|
<name><xsl:copy-of select="$package"/></name>
|
||||||
<version><xsl:value-of select="$vers"/></version>
|
<version><xsl:copy-of select="$vers"/></version>
|
||||||
</package>
|
</package>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
|
|
Reference in a new issue