[indiana-discuss] Finding MAN pages
Dave Miner
dminer at opensolaris.org
Wed May 27 07:14:56 PDT 2009
Glenn Lagasse wrote:
> Hi All,
>
> I ran into some strange behaviour tonight while poking about. I'm
> running 2009.06 111b2 (111b, build 2). I apologize for the length.
>
> So I was looking for the javac man page. Typing man javac resulted in:
>
> glagasse at shire:~$ man javac
> No manual entry for javac.
>
> So, I checked to make sure javac was in my path because I recalled that
> the manwhich[1] project had integrated some time ago and was supposed to
> help in finding man pages for things in your path.
>
> glagasse at shire:~$ which javac
> /usr/bin/javac
>
> Ok, so it's in my path but manwhich isn't finding it. Now I don't
> recall javac living in /usr/bin so let's see what it really is:
>
> glagasse at shire:~$ ls -al /usr/bin/javac
> lrwxrwxrwx 1 root root 17 2009-05-19 17:19 /usr/bin/javac -> ../java/bin/javac
>
> Ahh, so it's a symlink to the real javac binary sitting in
> /usr/java/bin. Possible bug #1, manwhich can't find man pages for
> commands which are symlinked in your path.
>
> Let's see if we have a MANPATH:
>
> glagasse at shire:~$ echo $MANPATH
> /usr/gnu/share/man:/usr/share/man:/usr/X11/share/man
>
> We do, courtesy of the default .profile file delivered in OpenSolaris
> for the initial user created at install time.
>
> So, if I unset MANPATH what happens?
>
> glagasse at shire:~$ unset MANPATH
> glagasse at shire:~$ man javac
> No manual entry for javac.
>
> Ok, that doesn't help. Let's add /usr/java/bin to our PATH.
>
> glagasse at shire:~$ export PATH=$PATH:/usr/java/bin
> glagasse at shire:~$ man javac
> Reformatting page. Please Wait... done
>
> That works. What happens if we leave MANPATH set and add /usr/java/bin
> to our PATH:
>
> glagasse at shire:~$ export MANPATH=/usr/gnu/share/man:/usr/share/man:/usr/X11/share/man
> glagasse at shire:~$ export PATH=$PATH:/usr/java/bin
> glagasse at shire:~$ man javac
> No manual entry for javac.
>
> That doesn't work.
>
> So, I think we have a couple of issues here. The manwhich project
> ideally obviated the need to specifically set MANPATH. So I think we
> should entertain the idea of removing this setting from the default
> .profile that we create for the initial user account during
> installation. The second issue is that manwhich can't find man pages
> for commands which are in a user's path via a symlink. That's kind of
> bad imo. Especially for a new user. They'll be able to run the
> command, see it in their path but won't be able to find it's man page.
> Not a great user experience. Or, is it a bug that we create a symlink
> for javac (and other java related things) in /usr/bin (I don't think so,
> I can understand why this is done but it is something we might revisit I
> guess).
>
> So, should I file bugs? I think so. The question is where and against
> what product/cat/subcat?
>
Yes, distribution/opensolaris/software to get the MANPATH removed from
the /etc/skel/.profile.
I'd think the javac issue should be resolved by the Java package
delivering a symlink into the main man paths as well. At least that
would be self-consistent.
Dave
More information about the indiana-discuss
mailing list