ablfs-more
trunk
Last change
on this file since 875366f was a6fbc65, checked in by Pierre Labastie <pierre.labastie@…>, 3 years ago |
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).
|
-
Property mode
set to
100644
|
File size:
1.8 KB
|
Rev | Line | |
---|
[e576789] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
| 2 |
|
---|
| 3 | <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
---|
| 4 | version="1.0">
|
---|
| 5 |
|
---|
| 6 | <xsl:param name="packages" select="'packages.xml'"/>
|
---|
| 7 | <xsl:param name="package" select="''"/>
|
---|
| 8 | <xsl:param name="version" select="'N'"/>
|
---|
| 9 |
|
---|
[a6fbc65] | 10 | <xsl:variable name="realpackage">
|
---|
| 11 | <xsl:choose>
|
---|
| 12 | <xsl:when test="contains($package, '-pass1')">
|
---|
| 13 | <xsl:copy-of select="substring-before($package, '-pass1')"/>
|
---|
| 14 | </xsl:when>
|
---|
| 15 | <xsl:otherwise>
|
---|
| 16 | <xsl:copy-of select="$package"/>
|
---|
| 17 | </xsl:otherwise>
|
---|
| 18 | </xsl:choose>
|
---|
| 19 | </xsl:variable>
|
---|
| 20 |
|
---|
[e576789] | 21 | <xsl:variable name="vers">
|
---|
| 22 | <xsl:choose>
|
---|
| 23 | <xsl:when test="$version='N'">
|
---|
| 24 | <xsl:value-of select=
|
---|
| 25 | "document($packages)//*[self::package or self::module]
|
---|
[a6fbc65] | 26 | [string(name)=$realpackage]/version"/>
|
---|
[e576789] | 27 | </xsl:when>
|
---|
| 28 | <xsl:otherwise>
|
---|
[a6fbc65] | 29 | <xsl:copy-of select="$version"/>
|
---|
[e576789] | 30 | </xsl:otherwise>
|
---|
| 31 | </xsl:choose>
|
---|
| 32 | </xsl:variable>
|
---|
| 33 |
|
---|
| 34 | <xsl:output
|
---|
| 35 | method="xml"
|
---|
| 36 | encoding="ISO-8859-1"
|
---|
| 37 | doctype-system="PACKDESC"/>
|
---|
| 38 |
|
---|
| 39 | <xsl:template match="/">
|
---|
| 40 | <sublist>
|
---|
| 41 | <xsl:copy-of select="./sublist/name"/>
|
---|
| 42 | <xsl:apply-templates select=".//package"/>
|
---|
| 43 | <xsl:if test="not(.//package[string(name)=$package])">
|
---|
| 44 | <package>
|
---|
[a6fbc65] | 45 | <name><xsl:copy-of select="$package"/></name>
|
---|
| 46 | <version><xsl:copy-of select="$vers"/></version>
|
---|
[e576789] | 47 | </package>
|
---|
| 48 | </xsl:if>
|
---|
| 49 | </sublist>
|
---|
| 50 | </xsl:template>
|
---|
| 51 |
|
---|
| 52 | <xsl:template match="package">
|
---|
| 53 | <xsl:choose>
|
---|
| 54 | <xsl:when test="string(name)=$package">
|
---|
| 55 | <package>
|
---|
[a6fbc65] | 56 | <name><xsl:copy-of select="$package"/></name>
|
---|
| 57 | <version><xsl:copy-of select="$vers"/></version>
|
---|
[e576789] | 58 | </package>
|
---|
| 59 | </xsl:when>
|
---|
| 60 | <xsl:otherwise>
|
---|
| 61 | <xsl:copy-of select='.'/>
|
---|
| 62 | </xsl:otherwise>
|
---|
| 63 | </xsl:choose>
|
---|
| 64 | </xsl:template>
|
---|
| 65 |
|
---|
| 66 | </xsl:stylesheet>
|
---|
Note:
See
TracBrowser
for help on using the repository browser.