learn to count packages

This commit is contained in:
nim 2006-10-08 09:44:18 +00:00
parent ff5d6b3555
commit 9f7d9445b3

View File

@ -98,8 +98,9 @@
</xsl:template>
<!-- Warn about packages referenced several times (at least twice;)) -->
<xsl:template match="packagereq[generate-id(.) = generate-id(key('unique-packages',text())[2])]" priority="1">
<xsl:message> ☹ Package <xsl:value-of select="text()"/> is referenced in multiple groups:</xsl:message>
<xsl:for-each select="key('unique-packages',text())">
<xsl:variable name="dupes" select="key('unique-packages',text())"/>
<xsl:message> ☹ Package <xsl:value-of select="text()"/> is referenced by <xsl:value-of select="count($dupes)"/> groups:</xsl:message>
<xsl:for-each select="$dupes">
<xsl:sort select="../../id/text()"/>
<xsl:message><xsl:value-of select="@type"/> package in group <xsl:value-of select="concat(../../_name/text(),' (',../../id/text(),')')"/></xsl:message>
</xsl:for-each>