Bug 128691 - "man -a" produces superfluous and incorrect diagnostic output
Summary: "man -a" produces superfluous and incorrect diagnostic output
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: man
Version: 2
Hardware: i686
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Eido Inoue
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-07-28 04:13 UTC by Carlo Graziani
Modified: 2007-11-30 22:10 UTC (History)
0 users

Fixed In Version: 1.5o1-1
Clone Of:
Environment:
Last Closed: 2004-11-09 23:50:16 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Carlo Graziani 2004-07-28 04:13:35 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040510

Description of problem:
man prints some superfluous and incorrect diagnostics when invoked
with -a on some man pages.

The reason is that it locates certain man pages twice, once in section
1 (for example), then again in section 1p, despite the fact that the
man page does not exist in section 1p.

Some debugger work shows that the source of the problem is in
manfile.c, in the function manfile_from_section().  Here's the culprit:

if (res == NULL && isdigit(section[0]) && section[1]) {
     char sec[2];
 
     sec[0] = section[0];
     sec[1] = 0;
     for (mp = manpath; *mp; mp++) {
        append(&res, manfile_from_sec_and_dir(*mp, sec, name, flags));
          if (res && (flags & ONLY_ONE_PERSEC))
               break;
     }
}
                                                                     
                                                                     
          
Here, when section contains "1p", sec contains "1", and so
manfile_from_sec_and_dir() locates the man page in section 1, for the
second time (the first time was when section contained "1").

The result is that the 'struct manpage *res' in manfile() contains a
duplicate entry, which triggers an apparently silly duplication
complaint from is_different() in different.c.


Version-Release number of selected component (if applicable):
man-1.5m2-6

How reproducible:
Always

Steps to Reproduce:
1.man -a bash
2. type 'q' to exit the displayed manual page
3.
    

Actual Results:  The following output appears:

Man page /usr/share/man/man1/bash.1.gz is identical to
/usr/share/man/man1/bash.1.gz
No manual entry for bash


Expected Results:  Nothing.

Additional info:

Comment 1 Carlo Graziani 2004-07-28 18:59:44 UTC
Further note in support of this diagnosis:

Removing the "1p" entry from the MANSECT line in
/etc/man.config results in 'man -a bash' displaying
without spurious error messages.

Comment 2 Eido Inoue 2004-11-09 23:50:16 UTC
update to man-1.5o1 which has integrated posix page version support
(combined with the removed MANSECT hardcode) appears to fix this.


Note You need to log in before you can comment on or make changes to this bug.