manpage not recognized if doesn't start with ".TH "

Bug #893337 reported by Emilien Klein
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
python-distutils-extra (Ubuntu)
Fix Released
Medium
Dominique Lasserre

Bug Description

I have a manpage that starts with a "Hey, EMACS:" line [0], which is how the example files is created when following the Debian new maintainer's guide.

distutils-extra considers a file that matched '*.[0123456789]' as a valid man page only if it starts with the string ".TH " [1]. This results in that manpage to not be automatically recognized, and has 2 consequences:

- You need to add a line in MANIFEST.in with "include doc/*"
- The file appears in the list printed after "WARNING: the following files are not recognized by DistUtilsExtra.auto" (even though the file is covered by MANIFEST.in, just reported bug 893335)

Maybe the check to see if the file is a valid manpage should do something like this:
    if line.startswith('.TH ') or line.startswith('.\"'):

[0] bazaar.launchpad.net/~emilien-klein/nautilus-image-manipulator/trunk/view/110/doc/nautilus-image-manipulator.1
[1] http://bazaar.launchpad.net/~python-distutils-extra-hackers/python-distutils-extra/debian/view/head:/DistUtilsExtra/auto.py#L304

Revision history for this message
John S. Gruber (jsjgruber) wrote :

gmanedit also adds a comment at the beginning of man pages, to the same effect.

Apparently they can be moved down the file a line without harm (as a circumvention).

Revision history for this message
Dominique Lasserre (lasall) wrote :

Hi the fix in related branch should solve this issue.

Changed in python-distutils-extra:
assignee: nobody → Dominique Lasserre (lasall)
status: New → In Progress
Martin Pitt (pitti)
affects: python-distutils-extra → python-distutils-extra (Ubuntu)
Changed in python-distutils-extra (Ubuntu):
status: In Progress → Fix Committed
importance: Undecided → Medium
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python-distutils-extra - 2.37-1

---------------
python-distutils-extra (2.37-1) unstable; urgency=low

  [ Martin Pitt ]
  * auto.py: Recognize manpages which have comments before the initial .TH
    comment. Thanks to Dominique Lasserre for the initial patch!
    (LP: #893337)

  [ Andrew Starr-Bochicchio ]
  * debian/local/python-mkdebian: Handle Glade .ui files correctly when
    generating the copyright file. Also ignore backup files.
    (LP: #1025491)

python-distutils-extra (2.36-1) unstable; urgency=low

  * debian/rules: Run tests against all supported python 2 and 3 versions.
    This catches bugs with Python 2.6. (Closes: #684967)
  * debian/rules: Skip tests if $DEB_BUILD_OPTIONS contains "nocheck".
    (Closes: #684966)
  * debian/rules: Run tests under LC_ALL=C, to fix FTBFS in cases where
    LC_CTYPE is set explicitly. Thanks Gregor Hermann!
  * auto.py: Use python 2.6 friendly sys.version_info test. Thanks Salvatore
    Bonaccorso and Gregor Hermann! (First half of #682631)
  * auto.py: Do not call decode() with an "errors" keyword, as this does not
    yet work with Python 2.6. Thanks Gregor Hermann! (Closes: #682631)
 -- Martin Pitt <email address hidden> Mon, 17 Sep 2012 12:47:44 +0200

Changed in python-distutils-extra (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.