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:

glaga...@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.

glaga...@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:

glaga...@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:

glaga...@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?

glaga...@shire:~$ unset MANPATH
glaga...@shire:~$ man javac
No manual entry for javac.

Ok, that doesn't help.  Let's add /usr/java/bin to our PATH.

glaga...@shire:~$ export PATH=$PATH:/usr/java/bin
glaga...@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:

glaga...@shire:~$ export 
MANPATH=/usr/gnu/share/man:/usr/share/man:/usr/X11/share/man
glaga...@shire:~$ export PATH=$PATH:/usr/java/bin
glaga...@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?

Cheers,

-- 
Glenn

1 - PSARC/2007/688 manwhich: deriving MANPATH from PATH
    6634079 man should take hints from PATH when MANPATH not set
_______________________________________________
indiana-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/indiana-discuss

Reply via email to