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

[SCM] Debian package checker branch, master, updated. 2.2.10-67-ga77ef57



The following commit has been merged in the master branch:
commit a77ef57b782cc7fc6cd1e9da2df3758faa289cc9
Author: Adam D. Barratt <adam@adam-barratt.org.uk>
Date:   Fri May 29 20:27:34 2009 +0100

    Remove support for checking whether man supports --warnings
    
    * checks/manpages:
      + [ADB] Remove support for detecting whether man supports the --warnings
        flag.  The version of man shipped in lenny supports it so the
        compatibility code is no longer required.

diff --git a/checks/manpages b/checks/manpages
index 2556ab5..68229d1 100644
--- a/checks/manpages
+++ b/checks/manpages
@@ -24,10 +24,6 @@ use Lintian::Relation::Version qw(versions_gte);
 use Tags;
 use Util;
 
-# Set to true if the man program supports --warnings based on its version
-# number.  This is probed if this variable is undefined and set to 0 or 1.
-our $MAN_WARNINGS;
-
 sub run {
 
 my $pkg = shift;
@@ -233,28 +229,16 @@ foreach my $file (sort keys %{$info->index}) {
 	    tag "manpage-has-bad-whatis-entry", "$file" if $? != 0;
 	}
 
-	# If we've not probed yet, determine if man supports --warnings.
-	# This can be removed once man 2.5.1 makes it to testing.
-	unless (defined $MAN_WARNINGS) {
-	    my $version = `man -V 2>&1`;
-	    if ($? == 0 && $version =~ / (\d+\.[\d.]+)(,|\Z)/) {
-		$MAN_WARNINGS = versions_gte($1, '2.5.1');
-	    } else {
-		$MAN_WARNINGS = 0;
-	    }
-	}
-
 	# If it's not a .so link, run it through "man" to check for errors.
 	# If it is in a directory with the standard man layout, cd to the
 	# parent directory before running man so that .so directives are
 	# processed properly.  (Yes, there are man pages that include other
 	# pages with .so but aren't simple links; rbash, for instance.)
 	my $cmd;
-	my $warnings = $MAN_WARNINGS ? ' --warnings' : '';
 	if ($file =~ m,^(.*)/(man\d/.*)$,) {
-	    $cmd = "cd unpacked/\Q$1\E && man$warnings -E UTF-8 -l \Q$2\E";
+	    $cmd = "cd unpacked/\Q$1\E && man --warnings -E UTF-8 -l \Q$2\E";
 	} else {
-	    $cmd = "man$warnings -E UTF-8 -l unpacked/\Q$file\E";
+	    $cmd = "man --warnings -E UTF-8 -l unpacked/\Q$file\E";
 	}
 	my $pid = open MANERRS, '-|';
 	if (not defined $pid) {
@@ -280,15 +264,6 @@ foreach my $file (sort keys %{$info->index}) {
 	    # ignore wrapping failures if they contain URLs
 	    next if /:(\d+): warning \[.*\]: (can\'t break|cannot adjust) line/
 		and $manfile[$1 - 1] =~ m,(?:http|ftp)://.+,i;
-	    # ignore charset issues with old versions of man for all man pages
-	    # since we can't know, with old versions, whether that was just a
-	    # Unicode issue
-	    if (!$MAN_WARNINGS and
-		(m/warning: can\'t find numbered character/
-		 or m/a magic token is not allowed in a name/
-		 or m/name expected \(got a magic token\)/)) {
-		next;
-	    }
 	    # ignore common undefined macros from pod2man << Perl 5.10
 	    next if /warning: \`(Tr|IX)\' not defined/;
 	    chomp;
diff --git a/debian/changelog b/debian/changelog
index df399a6..7d24575 100755
--- a/debian/changelog
+++ b/debian/changelog
@@ -45,6 +45,10 @@ lintian (2.2.11) UNRELEASED; urgency=low
       directories.
     + [RA] Downgrade certainty of tags for which we recommend overrides.
       Patch from Raphael Geissert.
+  * checks/manpages:
+    + [ADB] Remove support for detecting whether man supports the --warnings
+      flag.  The version of man shipped in lenny supports it so the
+      compatibility code is no longer required.
   * checks/scripts:
     + [ADB] Do not include an empty alternative in the list of suggested
       dependencies for an interpreter when the interpreter may be
diff --git a/private/TODO b/private/TODO
index 2d87a3f..1115d60 100644
--- a/private/TODO
+++ b/private/TODO
@@ -22,9 +22,6 @@ checks:
   rename checks/menus to checks/doc-base and separate out the few bits
   that are actually about menus).
 
-- Remove support for old man programs in checks/manpages; lintian.d.o is
-  running lenny and we don't have to support anything older.
-
 - Go through all tags and make sure that any that should have Policy
   references have them, and more generally that appropriate references are
   present.  (Need some way to track this sort of regular tag maintenance.)

-- 
Debian package checker


Reply to: