man 1.6f - add bin/../share/man to manpath
Forwarding for additional feedback.
----- Forwarded message from Matt Domsch <Matt_Domsch@dell.com> ----- Date: Wed, 14 Jan 2009 13:54:32 -0600 From: Matt Domsch <Matt_Domsch@dell.com> To: flucifredi@acm.org, freestandards-fhs-discuss@lists.sourceforge.net Cc: Ivana Varekova <varekova@redhat.com>, werner@suse.de, Colin Watson <cjwatson@debian.org> Subject: [PATCH] man 1.6f - add bin/../share/man to manpath Status: RO man searches for package/bin/ directories on $PATH, and then looks for package/man/ directories to exist as well. When trying to place packages into /opt/<provider>/<package> per FHS 2.3 [1], it expects manpages to be found under this point, in share/man, not in man/. /opt/<provider>/<package>/bin will get placed on $PATH, but share/man won't be found without somehow editing $MANPATH, /etc/man.config, or making share/man get automatically found by man. Patch below adds ../share/man/ to the search path, after ../man/, for bin/ directories on $PATH. This adds one extra stat() call per bin/ directory listed in $PATH for each invocation of man. Feedback requested. [1] http://www.pathname.com/fhs/pub/fhs-2.3.html Thanks, Matt -- Matt Domsch Linux Technology Strategist, Dell Office of the CTO linux.dell.com & www.dell.com/linux diff -urNp --exclude-from=/home/mdomsch/excludes --minimal man-1.6f.orig/src/manpath.c man-1.6f/src/manpath.c --- man-1.6f.orig/src/manpath.c 2009-01-14 12:54:25.000000000 -0600 +++ man-1.6f/src/manpath.c 2009-01-14 13:17:14.000000000 -0600 @@ -106,7 +106,8 @@ is_directory (char *path) { /* * Check to see if the current directory has man or MAN - * or ../man or ../man1 or ../man8 subdirectories. + * or ../man or ../man1 or ../man8 or ../share/man + * subdirectories. */ static char * find_man_subdir (char *p) { @@ -144,6 +145,12 @@ find_man_subdir (char *p) { if (is_directory (t) == 1) return t; + /* look for the situation with packagedir/bin and packagedir/share/man */ + strcpy (t + len, "/share/man"); + + if (is_directory (t) == 1) + return t; + /* look for the situation with pkg/bin and pkg/man1 or pkg/man8 */ /* (looking for all man[1-9] would probably be a waste of stats) */ strcpy (t + len, "/man1"); ----- End forwarded message ----- -- Matt Domsch Linux Technology Strategist, Dell Office of the CTO linux.dell.com & www.dell.com/linux -- ubuntu-devel mailing list ubuntu-devel@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel |
man 1.6f - add bin/../share/man to manpath
On Wed, Jan 14, 2009 at 01:58:24PM -0600, Matt Domsch wrote:
> Forwarding for additional feedback. For the record of bystanders on the list, I've attached the mail I sent in response to your mail directly to me as man-db upstream. Regards, -- Colin Watson [cjwatson@ubuntu.com] -- ubuntu-devel mailing list ubuntu-devel@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel |
| All times are GMT. The time now is 06:24 AM. |
VBulletin, Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.