bugDatabase-driven manual pager suite - Bugs: bug #34811, BUG: whatis doesn't index Perl...

 
 

bug #34811: BUG: whatis doesn't index Perl module manpage; PATCH included

Submitter:  None
Submitted:  Sat 12 Nov 2011 10:53:24 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Need Info
Privacy:  Public Assigned to:  cjwatson
Open/Closed:  Open
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 13 Nov 2011 02:10:43 PM UTC, comment #4: 

'mandb -c', surely, not makewhatis?  The latter is from a different implementation of man.  It shouldn't take too desperately long to run though.  (Your mention of makewhatis makes me wonder if some other implementation of apropos is interfering here ...)

As far as the lex scanner is concerned, that section is only handling special cases.  Ordinary unbackslashed characters generally get passed straight through and don't need to be handled explicitly.

As far as whatis.c is concerned, the word-match code does allow only alphabetic characters and underscore, but as I say, that seems correct and shouldn't even be called normally anyway, so something is odd here and I'd like to know what before changing anything.

The nroff that we use is part of the groff package; it actually just calls groff with options to produce text output.  As far as the input format is concerned, they're the same thing.

Colin Watson <cjwatson>
Group administrator
Sun 13 Nov 2011 02:17:49 AM UTC, comment #3: 

Irk...
Reproducing will be a pain...i.e. will have to reinstall the broken version and rerun 'makewhatis'...and have it remake the db's, ...

Cuz now, there is nothing that doesn't show up that I'd expect.

I did the one you did below and came back with 43 entries....
whereas before...had none.


So Can you explain to me how the the code I submitted against (pre-patch could work, since it only allows alpha chars and underscore in the scanner.  I admit to being VERY rusty in lex...many years since dabbled there, not to mention not knowing groff with a bleep....but doesn't man use nroff?  isn't groff for graphical output?...
(dunno would have to look any and all of this up)...

Linda A. Walsh <law>
Sun 13 Nov 2011 12:40:11 AM UTC, comment #2: 

Thanks for your report and patch!

The change to lexgrog.l seems incorrect to me.  It adds code to interpret '\:' as a colon, but '\:' is a groff escape which inserts a zero-width break point, and that should not be treated as a colon by lexgrog.  I don't recall ever seeing manual page authors using this as a mistake for ':'; even if they did, groff wouldn't render it the way they wanted anyway.

As for the change to whatis.c, I'm a bit confused.  At first sight I thought that it was causing a colon to be treated as a word boundary, which would have been fair enough, but actually this patch does the exact opposite, which feels counterintuitive to me; the colon-separated parts of a Perl module name are different words as far as I'm concerned, at least for the purposes of searching.  Also, I'm not quite clear on how you're invoking apropos that triggers this.  apropos defaults to -r (--regex), so the functions you're patching in whatis.c should never be called.

I believe you that there is some problem, though (perhaps compounded by openSUSE apparently still using a rather old version of man-db; 2.5.2 dates from May 2008, and I've made ten releases since then, seven of which predate openSUSE 11.4), and I'd like to help track it down.  Could you show me the apropos command you're running that demonstrates this problem, and also the full output of the same command with the --debug option added?  Also, it would help if you could attach the raw contents of a sample manual page file that you expect to be found by apropos but isn't.

For comparison, on Debian unstable:

  $ apropos extutils | head
  ExtUtils::CBuilder (3perl) - Compile and link C code for Perl modules
  ExtUtils::CBuilder (3pm) - Compile and link C code for Perl modules
  ExtUtils::CBuilder::Platform::Windows (3perl) - Builder class for Windows pla...
  ExtUtils::CBuilder::Platform::Windows (3pm) - Builder class for Windows platf...
  ExtUtils::ParseXS (3perl) - converts Perl XS code into C code
  ExtUtils::ParseXS (3pm) - converts Perl XS code into C code
  Module::Build::Compat (3perl) - Compatibility with ExtUtils::MakeMaker
  Module::Build::Compat (3pm) - Compatibility with ExtUtils::MakeMaker
  ExtUtils::Command (3perl) - utilities to replace common UNIX commands in Make...
  ExtUtils::Command::MM (3perl) - Commands for the MM's to use in Makefiles

... which seems reasonable enough to this Perl user.

Colin Watson <cjwatson>
Group administrator
Sat 12 Nov 2011 11:03:21 PM UTC, comment #1: 

Sorry, this was a post by me...

I didn't realize I'd been logged out... I checked when I got
to savannah, and saw logged in, but then didn't realize the
sitename had switched thus forcing a need to relogin...

Oops.


Linda A. Walsh <law>
Sat 12 Nov 2011 10:53:24 PM UTC, original submission:  

even though I have a fair number of perl modules to solve
problems, I can never remember their names/capitalization, etc.  With most langs, I can use "apropos"..whatever, and have my answer, but apropos has been shutting out perl. :-(

It didn't seem to realize that ':' was allowed in a library routine name...(imagine that!??)...


Anyway, the attached, patch (2 files, 3 lines modified/expanded) addresses the problem.

If you could fix this in some 'soon' upcoming release, I'm sure
perl users worldwide would be appreciative!

thanks...

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #24364:  perlman.diff added by None (1KiB - application/octet-stream - patch against man-db 2.5.2 (as patched from suse11.4 source rpms))

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by cjwatson (Posted a comment)
  • -email is unavailable- added by law (Posted a comment)
  • -email is unavailable- added by law (Linda Walsh)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2011-11-13 cjwatson StatusNone Need Info
        Assigned toNone cjwatson
    2011-11-12 law Carbon-Copy- Added -email is unavailable-
    2011-11-12 None Attached File- Added perlman.diff, #24364

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code