Mantis - xmlto
Viewing Issue Advanced Details
3895 regular use major always 2009-09-14 14:56 2009-10-07 20:56
dam  
bwalton  
normal  
closed  
fixed  
none    
none  
0003895: xmlto calls 'tail' with wrong path
/opt/csw/bin/xmlto calls 'tail' with '-n 1' instead of '-1'. The options would be valid for /usr/xpg4/bin/tail, though.
build8s% /opt/csw/bin/xmlto -vv man colordiff.xml
usage: tail [+/-[n][lbc][f]] [file]
       tail [+/-[n][l][r|f]] [file]
Source format: docbook / root element:
Format script: /opt/csw/share/xmlto/format/docbook/man
Convert to troff
Real stylesheet: http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl [^]
This would fix the problem:

build8s% diff /opt/csw/bin/xmlto /opt/csw/bin/xmlto.orig
354c354
< rootel=$(echo "xpath *" | xmllint --shell $INPUT_FILE 2> /dev/null |head -n 3 |/usr/xpg4/bin/tail -n 1 | cut -f 4 -d " " )
---
> rootel=$(echo "xpath *" | xmllint --shell $INPUT_FILE 2> /dev/null |head -n 3 |tail -n 1 | cut -f 4 -d " " )
Issue History
2009-09-14 14:56 dam New Issue
2009-09-14 22:29 bwalton Note Added: 0006700
2009-09-18 20:30 bwalton Note Added: 0006718
2009-09-18 20:30 bwalton Assigned To => bwalton
2009-09-18 20:30 bwalton Status new => assigned
2009-10-07 20:56 bwalton Note Added: 0006814
2009-10-07 20:56 bwalton Status assigned => closed
2009-10-07 20:56 bwalton Resolution open => fixed

Notes
(0006700)
bwalton   
2009-09-14 22:29   
I always run with /opt/csw/gnu near the head of my path, so this didn't bite me. It looks like I'll need to patch the source (easy) since there are no configure options for this tool. Will patch, reroll (with the pending 0.22 update) and submit upstream.

I'll add --with-tail to configure.

(0006718)
bwalton   
2009-09-18 20:30   
Issue seemingly fixed an patches have been applied upstream.

Won't release until entire stack of docbook/xml stuff can go as a batch.
(0006814)
bwalton   
2009-10-07 20:56   
Corrected via patch (accepted upstream).