You are not logged in.
When I do man -k CMD, I get funny output like this:
CMD [] (1) - description of CMD
What are the '[]'s doing there?
It gets worse: "man -k rdiff" gives:
...
rdiff [] (1) - backup - local/remote mirror and incremental backup
rdiff [] (1) - backup-statistics - summarize rdiff-backup statistics files
rdiff [] (1) - compute and apply signature-based file differences
See what's happening: the bit after the first '-' in rdiff-* is getting chopped off and moved into the description field.
Besides being ugly, this also means that "man -k rdiff-backup" won't find the rdiff-backup entry.
I tried "sudo makewhatis -w" but the problem persists. I searched the forums, and though there are a lot of questions about man, I didn't find any about this problem.
Any ideas?
Offline
I can reproduce this.
I checked on a Debian system, and everything was working perfectly there (which I expected anyway for this kind of stuff).
Then I checked their man version, and noticed they used the man replacement : man-db
http://bugs.archlinux.org/task/9130
I did pacman -S man-db as root, mandb as user. And everything works fine now.
I would suggest voting for the feature request above and adding a comment.
pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))
Offline
I can reproduce this.
I checked on a Debian system, and everything was working perfectly there (which I expected anyway for this kind of stuff).
Then I checked their man version, and noticed they used the man replacement : man-db
http://bugs.archlinux.org/task/9130I did pacman -S man-db as root, mandb as user. And everything works fine now.
I would suggest voting for the feature request above and adding a comment.
I had man-db installed once before, you lose all color support for man pages, atleast I did. This is an unwanted feature of man-db if you ask me. Can this be fixed as well?
Offline
I had man-db installed once before, you lose all color support for man pages, atleast I did. This is an unwanted feature of man-db if you ask me. Can this be fixed as well?
Arf that is true. I also hope there is a way. There must be one !
pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))
Offline
I dislike this issue also but I dislike colorless manpages more.
[git] | [AURpkgs] | [arch-games]
Offline
OK, I poked around in the makewhatis code, and though I didn't take time to analyze the whole thing, the following patch seems to fix the incorrect '-' breaking on names and the empty '[]'s, and hasn't yet shown itself to break anything. Your mileage may well vary from "doesn't break anything." I'll submit the bug report and patches upstream.
--- pkg/usr/sbin/makewhatis 2008-08-19 13:14:06.000000000 -0400
+++ /usr/sbin/makewhatis 2008-08-19 13:18:45.000000000 -0400
@@ -333,7 +333,7 @@
done = 1;
} else {
if ($0 ~ progname"-") { # Fix old cat pages
- sub(progname"-", progname" - ");
+ sub(progname"-", progname"-"); # JP changed second " - " to "-"
}
if ($0 ~ /[^ \\]-$/) {
sub(/-$/, ""); # Handle Hyphenations
@@ -418,7 +418,7 @@
sub(/ $/, "", x); # Kill trailing spaces (again)
sub(/\.$/, "", x); # Kill trailing period
- if (!match(x, / - /))
+ if (!match(x, / - /)) # Fedora has if (!match(x, / --? /))
return;
after_dash = substr(x, RSTART);
@@ -426,7 +426,7 @@
while (match(head, /, /)) {
prog = substr(head, 1, RSTART-1);
head = substr(head, RSTART+2);
- if (prog != progname)
+ if (prog != progname && progname != "") # JP added second clause
prog = prog " [" progname "]";
printf "%-*s (%s) %s\n", 20, prog, actual_section, after_dash;
}
Last edited by Profjim (2008-08-19 18:23:02)
Offline
I didn't test it, but nice job for being able to write a patch, and for sending it upstream
Still, it looks like switching to man-db would be a good thing.
I was using the LESS pager with colors before, and here is the tip for making it work with man-db :
http://busybox.net/lists/busybox/2007-March/026798.html
export GROFF_NO_SGR=1
It works perfectly
It also looks possible to switch the pager to most, and define colors in ~/.mostrc, but I did not like the result.
pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))
Offline
Thanks for the report Peter.
I will look at it once I am back from holiday in ten days - this is a trivial fix.
If you guys have time, can you download the upstream package and do the verification that the problem is there without any of the Arch patches?
Talk to you in a bit - F
Offline
This is the only Arch patch and it just does what is instructed in the source so should not cause the problem...
http://repos.archlinux.org/viewvc.cgi/m … revision=1
Offline
looking into this now. Bug is a regression in 1.6f, issue did not exist in 1.6e. Grumble :-/
Offline
Thanks f2
Offline
brackets are a regression from 1.6f, dash-breakage seems to predate 1.6e.
Offline