Package: lintian
Version: 1.23.14
Severity: normal
Tags: patch

Hello,

Some "No such file or directory" false positives are caused by manpages
including other manpages (with the .so request).
When man is used with a local file, the MANPATH is not used, thus the
included man page must be in the path (i.e. with ".so man1/foo.1", the
current directory must contain the man1 directory).

I propose to cd to the right directory before calling man.


Note: I don't know why $file needed to be quoted (\Q$file\E). Please check
if something else needs to be quoted in my patch.


You can test the patch with the bash package.


-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.14
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)

Versions of packages lintian depends on:
ii  binutils             2.16.1cvs20051214-1 The GNU assembler, linker and bina
ii  diffstat             1.41-1              produces graph of changes introduc
ii  dpkg-dev             1.13.11.1           package building tools for Debian
ii  file                 4.15-2              Determines file type using "magic"
ii  gettext              0.14.5-2            GNU Internationalization utilities
ii  intltool-debian      0.34.1+20050828     Help i18n of RFC822 compliant conf
ii  libparse-debianchang 1.0-1               parse Debian changelogs and output
ii  man-db               2.4.3-3             The on-line manual pager
ii  perl [libdigest-md5- 5.8.7-10            Larry Wall's Practical Extraction 

lintian recommends no packages.

-- no debconf information

Thanks in advance,
-- 
Nekral
diff -rauN ../orig/lintian-1.23.14/checks/manpages 
./lintian-1.23.14/checks/manpages
--- ../orig/lintian-1.23.14/checks/manpages     2005-08-12 21:49:07.000000000 
+0200
+++ ./lintian-1.23.14/checks/manpages   2006-01-23 23:57:26.000000000 +0100
@@ -240,7 +240,14 @@
            }
        }
        # If it's not a .so link, run it through "man" to check for errors.
-       open MANERRS, '-|', "(LANG=C man -l unpacked/\Q$file\E >/dev/null) 2>&1"
+       my $cmd = "LANG=C man -l unpacked/\Q$file\E";
+       if ($file =~ m/^(.*)\/(man\d\/.*)$/) {
+               # Execute man in the directory that contains the manx
+               # directories. Otherwise, files included with .so won't be
+               # found.
+               $cmd = "cd unpacked/$1 && LANG=C man -l $2";
+       }
+       open MANERRS, '-|', "($cmd >/dev/null) 2>&1"
            or fail("cannot run man -l: $!");
        while (<MANERRS>) {
            # ignore progress information from man

Reply via email to