Author: nickboldt
Date: 2012-09-06 12:20:55 -0400 (Thu, 06 Sep 2012)
New Revision: 43471
Modified:
trunk/build/target-platform/target2targetTemplate.xsl
trunk/build/target-platform/targetUpdateFromRepo.xml
Log:
instead of regenerating .target file with a single version of an IU when there are
multiple versions present (and needed) omit those entries. In future, would be better to
regen whole nodes instead of just the versions so that .target file could list ALL IUs
present (features/plugins) including dupe IUs w/ multiple versions
Modified: trunk/build/target-platform/target2targetTemplate.xsl
===================================================================
--- trunk/build/target-platform/target2targetTemplate.xsl 2012-09-06 13:46:17 UTC (rev
43470)
+++ trunk/build/target-platform/target2targetTemplate.xsl 2012-09-06 16:20:55 UTC (rev
43471)
@@ -12,14 +12,25 @@
<xsl:template match="unit">
<xsl:choose>
<xsl:when test="$replace.versions">
-<unit id="{@id}" version="${{{(a)id}.version}}">
+
+<xsl:variable name="prevID"><xsl:value-of
select="preceding-sibling::* [1]/@id" /></xsl:variable> <!--
<prevID><xsl:value-of select="$prevID"/></prevID> -->
+<xsl:variable name="thisID"><xsl:value-of select="@id"
/></xsl:variable> <!-- <thisID><xsl:value-of
select="$thisID"/></thisID> -->
+<xsl:variable name="nextID"><xsl:value-of
select="following-sibling::* [1]/@id" /></xsl:variable> <!--
<nextID><xsl:value-of select="$nextID"/></nextID> -->
+
+<!-- if there is more than one node matching <unit id="some.id"/> then
DO NOT REPLACE the version -->
+<xsl:choose>
+ <xsl:when test="contains ($thisID, $nextID) or contains ($thisID,
$prevID)">
+ <!-- <xsl:comment> Note multiple versions of this IU; cannot update
automatically. </xsl:comment> -->
+ <unit id="{@id}"
version="{@version}"><xsl:apply-templates/></unit>
+ </xsl:when>
+ <xsl:otherwise>
+ <unit id="{@id}"
version="${{{@id}.version}}"><xsl:apply-templates/></unit>
+ </xsl:otherwise>
+</xsl:choose>
<xsl:apply-templates/>
-</unit>
</xsl:when>
<xsl:otherwise>
-<unit id="{@id}" version="{@version}">
-<xsl:apply-templates/>
-</unit>
+<unit id="{@id}"
version="{@version}"><xsl:apply-templates/></unit>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
Modified: trunk/build/target-platform/targetUpdateFromRepo.xml
===================================================================
--- trunk/build/target-platform/targetUpdateFromRepo.xml 2012-09-06 13:46:17 UTC (rev
43470)
+++ trunk/build/target-platform/targetUpdateFromRepo.xml 2012-09-06 16:20:55 UTC (rev
43471)
@@ -122,8 +122,9 @@
<filterchain>
<linecontains>
<contains value="${test.pattern}" />
- <contains value="feature.group" />
+ <!-- <contains value="feature.group" /> -->
</linecontains>
+ <striplinecomments><comment
value="#"/></striplinecomments>
</filterchain>
</loadfile>
<echo
file="${tmpfile}">${artifactVersionsPropertiesContents}</echo>
Show replies by date