forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docbook2X-0.8.8-error_on_missing_refentry.patch
33 lines (32 loc) · 1.22 KB
/
docbook2X-0.8.8-error_on_missing_refentry.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#! /bin/sh /usr/share/dpatch/dpatch-run
## 05_fix_439214_error_on_missing_refentry.dpatch by Daniel Leidert <[email protected]>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: If there is no refentry element, the manpage stylesheets silently
## DP: "ignores" this. It has been requested to print at least a
## DP: warning.
## DP:
## DP: <URL:http://bugs.debian.org/439214>
## DP: <URL:http://lists.gnu.org/archive/html/groff/2007-11/msg00023.html>
@DPATCH@
diff -urNad trunk~/xslt/man/docbook.xsl trunk/xslt/man/docbook.xsl
--- trunk~/xslt/man/docbook.xsl 2006-04-11 21:00:19.000000000 +0200
+++ trunk/xslt/man/docbook.xsl 2008-02-05 03:31:48.000000000 +0100
@@ -111,11 +111,15 @@
<xsl:when test="child::refentry">
<xsl:apply-templates />
</xsl:when>
-
- <xsl:otherwise>
+ <xsl:when test="descendant-or-self::refentry">
<manpageset>
<xsl:apply-templates select="descendant-or-self::refentry" />
</manpageset>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:message terminate="no">
+ <xsl:text>WARNING: Sorry, but I cannot find a refentry element in your source!</xsl:text>
+ </xsl:message>
</xsl:otherwise>
</xsl:choose>
</xsl:template>