Opened 18 years ago

Closed 18 years ago

#1786 closed defect (fixed)

Adapt compressdoc script to Man-DB

Reported by: alexander@… Owned by: dnicholson@…
Priority: high Milestone: 6.2.0
Component: BOOK Version: SVN
Severity: normal Keywords:
Cc:

Description (last modified by dnicholson@…)

The compressdoc script from http://www.linuxfromscratch.org/blfs/view/svn/postlfs/compressdoc.html reads the manual page paths from /etc/man.conf. This file no longer exists, because the LFS book uses Man-DB.

Attachments (2)

compressdoc-fix.patch (2.7 KB ) - added by alexander@… 18 years ago.
compressdoc-man_db-2.patch (3.0 KB ) - added by dnicholson@… 18 years ago.
Patch using `manpath' utility

Download all attachments as: .zip

Change History (9)

comment:1 by dnicholson@…, 18 years ago

Description: modified (diff)
Owner: changed from blfs-book@… to dnicholson@…
Status: newassigned

Alexander, the patch is gone somehow. Could you resubmit it?

by alexander@…, 18 years ago

Attachment: compressdoc-fix.patch added

comment:2 by alexander@…, 18 years ago

Milestone: future6.2

Attachment re-added

comment:3 by dnicholson@…, 18 years ago

OK, I've got the patch now. This is how I'm going to handle it. Since LFS stable still uses man, I'll add the patch to the repo, and add a note on the compressdoc page to use this patch if you have Man-DB. When LFS stable uses Man-DB, I'll make it the default.

Question, where is the appropriate patches location to add this patch since it's not really for a package?

comment:4 by archaic@…, 18 years ago

This patch can break in certain environments because it reads man_db.conf unconditionally and tries to change into dirs that don't exist. Use of the man-db utility "manpath" is a very easy drop-in replacement for man --path -C. I recommend the patch be regenerated so that the following is removed:

-  MAN_DIR=`man --path -C "$MAN_CONF"/man.conf \
-            | sed 's/:/\\n/g' \
+  MAN_DIR=`sed -n 's@^MANDATORY_MANPATH[^/]*\(/.*\)$@\1@ p' \
+              "$MAN_CONF"/man_db.conf \

and becomes:

-  MAN_DIR=`man --path -C "$MAN_CONF"/man.conf \
+  MAN_DIR=`manpath -C "$MAN_CONF"/man_db.conf \

The line with the sed from the original patch can stay unchanged because manpath outputs the same format as man --path does.

comment:5 by dnicholson@…, 18 years ago

Alexander, I'm assuming that since you haven't said anything that you're OK with the changes Archaic has suggested. I've generated a new patch that fixes a couple other output nitpicks I found when I actually tried to use it. I think the `manpath' suggestion works well.

by dnicholson@…, 18 years ago

Attachment: compressdoc-man_db-2.patch added

Patch using `manpath' utility

comment:6 by alexander@…, 18 years ago

The script using the "manpath" utility works. Thanks.

comment:7 by dnicholson@…, 18 years ago

Resolution: fixed
Status: assignedclosed

Committed in r5735. Closing ticket.

Note: See TracTickets for help on using tickets.