[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#285335: manpages: case-sensitive comparison between .TH and filename



Package: lintian
Version: 1.23.3
Severity: normal


/usr/share/lintian/checks/manpages checks for consistency between the
manual page section as given in .TH and the filename extension.  This
comparison is case-sensitive.  At least one upstream package that I
have worked with uses upper-case in .TH and lower-case in the filename
extension.  I have looked around for an answer to this, but have not
been able to find anything that conclusively states whether the
section in .TH is case-sensitive or not, but there are enough
examples of case-insensitive mismatches to make me think a
case-insensitive comparison is probably okay.  Just looking through
/usr/share/man, there are a lot of inconsistencies between manual page
sections and file names.  In particular, ncurses has matches that are
case-insensitive.  Many other packages have complete mismatches that
they just ignore.

If you think the comparison should be case-insensitive, this patch:

--- checks/manpages.qdist	2004-07-04 20:20:56.000000000 -0400
+++ checks/manpages	2004-12-12 11:19:35.000000000 -0500
@@ -243,7 +243,7 @@
 		require Text::ParseWords;
 		my ($th_command, $th_title, $th_section, $th_date ) = 
 		    Text::ParseWords::parse_line( '\s+', 0, $line);
-		if ($th_section && ($fn_section ne $th_section)) {
+		if ($th_section && (lc($fn_section) ne lc($th_section))) {
 		    tag "manpage-section-mismatch", "$file:$lc $fn_section != $th_section";
 		}
 	    }

does the job.  If you think the check should remain as it is, then go
ahead and tag this 'wontfix' or close it.  If you could site something
that resolves the issue, I can bring it to the upstream maintainers,
though I think they will pretty much not care about this issue....

-- 
Jay Berkenbilt <ejb@ql.org>
http://www.ql.org/q/


-- System Information:
Debian Release: 3.1
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.8-1-k7
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)

Versions of packages lintian depends on:
ii  binutils                      2.15-5     The GNU assembler, linker and bina
ii  diffstat                      1.35-1     produces graph of changes introduc
ii  file                          4.12-1     Determines file type using "magic"
ii  gettext                       0.14.1-6   GNU Internationalization utilities
ii  man-db                        2.4.2-19   The on-line manual pager
ii  perl [libdigest-md5-perl]     5.8.4-4    Larry Wall's Practical Extraction 

-- no debconf information



Reply to: