[texhax] trouble with texhash and pst-algparser.pro

Reinhard Kotucha reinhard.kotucha at web.de
Tue Feb 22 21:40:06 CET 2011


On 2011-02-22 at 06:02:06 -0500, Thomas Schneider wrote:

 > Reinhard:
 > 
 > Thanks for the quick response.
 > 
 > >  > sudo /usr/local/texlive/2010/bin/uniersal-darwin/texhash
 > > 
 > > Never call TeX programs with an absolute path.
 > 
 > I generally don't.  However, having moved the 2008 directory somewhere
 > else, I needed to be sure I was running the new version.  Are you
 > saying I should have done this:
 > 
 > cd /usr/local/texlive/2010/bin/uniersal-darwin/
 > sudo texhash
 
No.  Prepend /usr/local/texlive/2010/bin/universal-darwin to $PATH and
run texhash without specifying a particular file.  

 > ?  I don't see how that would have made much difference.

It doesn't matter in which directory you are because a properly setup
Unix system doesn't execute programs in the current directory (unless
you specify the path), but if you run

 /usr/local/texlive/2010/bin/uniersal-darwin/texhash

then texhash looks for kpsewhich in PATH and probably finds an
instance of another TL version there.  It uses the texmf.cnf of the
distribution in PATH, which is not necessarily TL-2010.

 > >  > 1. Could the MacTex installation do a texhash for users?
 > > 
 > > This is not necessary unless a particular user has TEXMFHOME in
 > > TEXMFDBS.
 > 
 > I don't have those variables in my env.

These variables are set in texmf.cnf.

 > I have TEXINPUTS pointing to inside my powerdot directory.

Do you maintain the stuff in this directory yourself?  One can use
TEXINPUTS for such things but I recommend TEXMFHOME or TEXMFLOCAL
instead.

 > >  > 2. Could the texhash be smarter and look for the most recent version
 > >  > instead of the oldest one?
 > > 
 > > No.  That would mess up the whole system.  texhash updates the TeX
 > > system which is found first in PATH.
 > 
 > >  > Why was pst-algparser.pro "suddenly" not found?  Oddly, this
 > >  > file is in the correct location in the 2008 distribution.
 > > 
 > > Are you using TL-2010 or TL-2008?

It doesn't matter then whether this file is in the 2008 distribution.
TeX Live never looks in distributions other than the one which is
found first in PATH.
 
 > According to my log file, I am now using TL-2010.  But I moved the old
 > versions to a new directory, /usr/local/texlive/old, so I looked into
 > that.  The file pst-algparser.pro is intact there.

This was not necessary.  All you have to do is to make sure that the
bin directory of the system you want to use is the first one in PATH.
 
 > I get the sense that a user is supposed to know a lot about the
 > guts of where things are, where things were and how the entire
 > system works.  The problem appears to be that I had previous
 > systems, 2005 and 2008.  I don't see why a new installation should
 > use the old stuff.  I expect that when I install a program I will
 > from then on have the new version and that I won't have to do
 > anything.  At minimum the installation could warn the user to read
 > some page somewhere.

The installer tells users what they have to put in PATH, MANPATH, and
INFOPATH and there isn't anything else they have to know, at least
unless they want to do fancy things.

You can have more than one installation installed.  The default
directory structure is:

/usr/local/texlive/2005
/usr/local/texlive/2008
/usr/local/texlive/2010
/usr/local/texlive/texmf-local

AFAIR in TL-2005 the texmf-local directory was inside 2005.  The
change was done in 2007.  You can fix it if you set

 TEXMFLOCAL=$SELFAUTOPARENT/../texmf.cnf

in 

 /usr/local/texlive/2005/texmf/web2c/texmf.cnf

Then /usr/local/texlive/texmf-local can be shared by all TL versions
you have installed.

If you have the impression that the TL version you are currently using
finds files in other TL installations, run

  tlmgr conf  or  texconfig conf

and inspect the output carefully.

tlmgr is the successor of texconfig but doesn't exist in TL-2005.

Furthermore, texhash tells you which files it updates.  You
immediately see if something is wrong.  Many other programs provide
similar information.  Keep your eyes open!

Another hint: Never run programs from inside a TEXMF tree.  Some
programs look for config files in the current directory first.  This
can be very confusing.

Regards,
  Reinhard

-- 
----------------------------------------------------------------------------
Reinhard Kotucha                                      Phone: +49-511-3373112
Marschnerstr. 25
D-30167 Hannover                              mailto:reinhard.kotucha at web.de
----------------------------------------------------------------------------
Microsoft isn't the answer. Microsoft is the question, and the answer is NO.
----------------------------------------------------------------------------


More information about the texhax mailing list