Bug 1161747 - "man -k -l word" does not show full header line
Summary: "man -k -l word" does not show full header line
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: man-db
Version: 19
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jan Chaloupka
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-11-07 18:54 UTC by Dale R. Worley
Modified: 2014-11-20 23:02 UTC (History)
2 users (show)

Fixed In Version: man-db-2.6.5-6.fc20
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-11-16 14:44:58 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Dale R. Worley 2014-11-07 18:54:27 UTC
Description of problem:

The manual page for "man" gives this form for getting summary lines:

       man -k [apropos options] regexp ...

The manual page for "apropos" shows that the -l option can be used to prevent trimming of displayed lines to the terminal width.  Nonetheless, the form:

       man -k -l regexp

does not show the full lines, they are trimmed to the terminal width.  (No error message is given, either.

Version-Release number of selected component (if applicable):

man-db-2.6.3-8.fc19.x86_64

How reproducible:

Reliably reproducible.

Steps to Reproduce:
1. "man -k -l attribute"

Actual results:

Displayed lines are truncated to terminal width.  E.g.,

add_wchnstr (3x)     - add an array of complex characters (and attributes) to ...

Expected results:

The same output as for "apropos -l", that is, not truncated.  E.g.,

add_wchnstr (3x)     - add an array of complex characters (and attributes) to a curses window

Additional info:

None.

Comment 1 Colin Watson 2014-11-08 14:52:16 UTC
It's hard to get everything right here because of effectively having to change option parsing semantics in midstream; but we can handle this specific case easily enough, so fixed upstream.

  http://git.savannah.gnu.org/cgit/man-db.git/commit/?id=81a66229658bfe38067ec001976cfecdf4bfeedf

Comment 2 Dale R. Worley 2014-11-08 21:06:40 UTC
Given the simplicity of the "man -k" form, I'd think it would be easier to invoke apropos directly, just passing it the remaining arguments:

char * const *new_argv = malloc(argc * sizeof (char * const));
new_argv[0] = "apropos";
memcpy(new_argv + 1, argv + 2, (argc - 1) * sizeof (char * const)); 
execvp("apropos", new_argv);

That way man doesn't need to know anything about the arguments to apropos.

Comment 3 Jan Chaloupka 2014-11-10 06:15:30 UTC
Hello,

thanks Colin for the patch.

Dale, I will wait till Wednesday till your proposal is settled down.

Jan

Comment 4 Fedora Update System 2014-11-13 10:25:33 UTC
man-db-2.6.3-9.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/man-db-2.6.3-9.fc19

Comment 6 Fedora Update System 2014-11-13 11:35:55 UTC
man-db-2.6.5-6.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/man-db-2.6.5-6.fc20

Comment 7 Fedora Update System 2014-11-13 11:36:26 UTC
man-db-2.6.7.1-12.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/man-db-2.6.7.1-12.fc21

Comment 8 Colin Watson 2014-11-13 11:53:25 UTC
(In reply to Dale R. Worley from comment #2)
> Given the simplicity of the "man -k" form, I'd think it would be easier to
> invoke apropos directly, just passing it the remaining arguments:

I agree in general; it just involves a bit more reorganisation (and thinking about what happens in the event that -k occurs in the middle of the options rather than the start).  Would you mind filing an upstream bug report for that?  https://savannah.nongnu.org/bugs/?group=man-db

Comment 9 Dale R. Worley 2014-11-13 17:01:16 UTC
(In reply to Colin Watson from comment #8)
> Would you mind filing an upstream bug report for
> that?  https://savannah.nongnu.org/bugs/?group=man-db

I have submitted this issue upstream at https://savannah.nongnu.org/support/index.php?108684

Comment 10 Fedora Update System 2014-11-14 12:06:18 UTC
Package man-db-2.6.3-9.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing man-db-2.6.3-9.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-15032/man-db-2.6.3-9.fc19
then log in and leave karma (feedback).

Comment 11 Fedora Update System 2014-11-16 14:44:58 UTC
man-db-2.6.7.1-12.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 12 Fedora Update System 2014-11-20 23:02:36 UTC
man-db-2.6.5-6.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.


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