[DRE-maint] Bug#688450: rdtool: misplaces a .TP in output man page (with ruby1.8)

Francesco Poli (wintermute) invernomuto at paranoici.org
Sat Sep 22 19:51:32 UTC 2012


Package: rdtool
Version: 0.6.34-4
Severity: normal
Tags: patch

Hello and thanks for maintaining rdtool in Debian!

I found a case where rd2 seems to produce a badly formed man page
(when run with ruby1.8).
I prepared a minimal test case to reproduce the bug.

  $ tar xvf frob_man_page.tar.gz
  frob
  frob.1

In this example, frob.1 is obtained on my system from frob with the
following command:

  $ ruby1.8 /usr/bin/rd2 -r rd/rd2man-lib.rb -o frob frob
  /usr/bin/rd2: output to frob.1...

If displayed with man

  $ man ./frob.1

the fake man page shows a spurious .TP at the end of the line
'To exit, use the special line "STOP".'
The successive option (-d) is wrongly indented.

Applying the following patch to frob.1 seems to cure the problem
for the output man page:


diff -ruN a/frob.1 b/frob.1
--- a/frob.1    2012-09-22 19:16:36.000000000 +0000
+++ b/frob.1    2012-09-22 19:34:37.000000000 +0000
@@ -27,7 +27,8 @@
 \&    STOP
 .fi
 
-To exit, use the special line "STOP"..TP
+To exit, use the special line "STOP".
+.TP
 .fi
 .B
 \-d


Applying the following patch to rd2man-lib.rb seems to fix the bug:


diff -ruN a/rd2man-lib.rb b/rd2man-lib.rb
--- a/rd2man-lib.rb     2012-06-17 17:32:23.000000000 +0000
+++ b/rd2man-lib.rb     2012-09-22 19:42:37.000000000 +0000
@@ -108,7 +108,7 @@
       if description.empty?
        ".TP\n.fi\n.B\n#{term}"
       else
-        %[.TP\n.fi\n.B\n#{term}\n#{description.join("\n")}].chomp
+        %[.TP\n.fi\n.B\n#{term}\n#{description.join("\n")}]
       end
     end
 

Please investigate this bug, forward my bug report upstream,
test my patch, ..., and let me know the outcome.

Thanks for your time!
Bye.


-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (800, 'testing'), (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.2.0-3-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages rdtool depends on:
ii  ruby                          4.9
ii  ruby-rd                       0.6.34-4
ii  ruby1.8 [ruby-interpreter]    1.8.7.358-4
ii  ruby1.9.1 [ruby-interpreter]  1.9.3.194-1

rdtool recommends no packages.

rdtool suggests no packages.

-- no debconf information
-------------- next part --------------
A non-text attachment was scrubbed...
Name: frob_man_page.tar.gz
Type: application/x-gzip
Size: 1171 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-ruby-extras-maintainers/attachments/20120922/cc0d430d/attachment.bin>


More information about the Pkg-ruby-extras-maintainers mailing list