Bug 128691 - "man -a" produces superfluous and incorrect diagnostic output
"man -a" produces superfluous and incorrect diagnostic output
Product: Fedora
Classification: Fedora
Component: man (Show other bugs)
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Eido Inoue
Depends On:
  Show dependency treegraph
Reported: 2004-07-28 00:13 EDT by Carlo Graziani
Modified: 2007-11-30 17:10 EST (History)
0 users

See Also:
Fixed In Version: 1.5o1-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-11-09 18:50:16 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Carlo Graziani 2004-07-28 00:13:35 EDT
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))
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):

How reproducible:

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

Actual Results:  The following output appears:

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

Expected Results:  Nothing.

Additional info:
Comment 1 Carlo Graziani 2004-07-28 14:59:44 EDT
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 18:50:16 EST
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.