On 11/5/07, Darren J Moffat <[EMAIL PROTECTED]> wrote:
> Mike Gerdts wrote:
> > Everyone seems to have their favorite order for PATH.  People seldom
> > seem to remember to make the corresponding changes to MANPATH.
> >
> > How much resistance would one encounter if the following logic was
> > used?  Compare to
> > http://cvs.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/cmd/man/src/man.c#311.
> >
> > if ( (manpath = getenv("MANPATH")) == NULL ) {
> >     if ( (path = getenv("PATH")) != NULL ) {
> >         /* for each PATH component
> >          *    if component ends in /bin or /sbin
> >          *        replace bin or sbin with man
> >          *        append to manpath
> >          */
> >     } else {
> >         manpath = MANDIR;
> >     }
> > }
>
> ARC case 2007/235 attempted to set a better default $MANPATH by other
> means and it never got approval.  This approach however might be
> slightly less controversial.
>
> However your logic has a MAJOR issue that causes a regression.
>
> Today MANPATH being unset isn't that unusual, but PATH being unset
> almost never happens.  With your logic there would be a regression since
> no library man pages would be found, a simple adjustment to either
> append or prepend MANDIR in the $PATH non null case would help with

I would be OK with appending.  Prepending would break exactly what I
am attempting to fix.  Whether a distro ships with /usr/gnu/bin before
/usr/bin or not is up to that distro, as the notion of tweaking
personal settings.  Having /usr/share/man at the beginning is only
acceptable if the one true way to use OpenSolaris is by having
/usr/bin at the beginning of PATH.

I do agree that /usr/share man should always appear in MANPATH.
There's a lot of sections other than 1* that aren't represented by
PATH.

> that.  Also it should probably be s@/[EMAIL PROTECTED]/share/man@  rather than
> s@/bin@/[EMAIL PROTECTED]

That is great for components that ship as part of OpenSolaris, but
third parties haven't really bought into the share/man idea.  I was
initially going down the route that OpenSolaris has symbolic links
pointing man to share/man.  Perhaps the thing to do is use share/man
if it exists, else man.

-- 
Mike Gerdts
http://mgerdts.blogspot.com/
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to