tlmgr (was: [OS X TeX] MacTeX-2008)
pony777 at gmail.com
Tue Sep 9 08:12:09 CEST 2008
I've managed to get tlmgr working consistently and learned a few
things along the way that may be of use to all of you.
As pointed out by Victor, tlmgr, by default, does in fact go to
different CTAN mirror each time it needs to download something.
Since all the mirrors are not in perfect sync, this leads to odd
situations where the mirror from which tlmgr.tlpkdb (the package
databased used to see if something new is available) could indicate
that some package has been updated, yet, when tlmgr tries to download
the update, it may try to get it from a different mirror that doesn't
yet have the package.
When this situation occurs (or if the download fails for some other
reason) bad things happen. When updating a package, tlmgr first
removes the old package and then downloads and installs the new one.
Perfectly sensible unless the download fails. When the download
fails, the old package is not restored -- it simply disappears
(having been removed as the first step in the update). This is the
likely cause of the various cases of disappearing files and programs
reported in this thread. I had my updmap and texdoc disappear due to
failed download. This is really bad behavior on the part of tlmgr
and hopefully will be fixed in an update soon.
Should you find yourself missing files, the easiest solution is to
just reinstall MacTex and start over. Alternatively you can use
'tlmgr search --file' to tell you to which package a particular file
belongs. For example 'tlmgr search --file updmap-sys' will reveal
that updmap-sys is part of the bin-tetex.universal-darwin package.
You can then use 'tlmgr install bin-tetex.universal-darwin' to
restore the missing file.
To (mostly -- downloads can still fail) avoid this situation you need
to tell tlmgr to not use the CTAN mirroring system, rather to
download from a specific mirror. This can be accomplished by using
the --location command line option to tlmgr, e.g. your update command
tlmgr --location http://ctan.math.utah.edu/tex-archive/systems/
texlive/tlnet/2008' update --all
This will force tlmgr to download from the specified ctan. While it
is true that one mirror may not in perfect sync with another,
everything seems to be consistent within one mirror. We are now left
determining which mirror to use. tlmgr has an environment variable
that helps in figuring this out. The variable TL_DOWNLOAD_ARGS
contains the arguments passed to wget by tlmgr when downloading. By
setting this to "-v -O" you can get verbose output from wget and
actually see which server mirror.ctan.org is telling wget to use. To
set the variable in your terminal enter for tcsh
setenv TL_DOWNLOAD_ARGS "-v -O"
or for bash
If you run 'tlmgr update --list' with this environment variable set,
you'll see downloads coming from a variety of ctan mirrors. This
will allow you pick one that seems to give you consistently high
speeds and a reliable connection. You can then use that server in
the location argument to tlmgr as I did above with
ctan.math.utah.edu. Note that you'll need to specify the whole url
up to the year.
After implementing the above, I was able to get reliable updates to
my MacTex installation. Yeah, it's complicated, but that fact that
automated mirroring works at all is a minor miracle.
Hope this helps some of you folks who ran into trouble. Note if the
above doesn't make sense to you, I would avoid tlmgr until the
TeXLive folks have worked on it some more. For an initial attempt at
a package management system for something as steeped in legacy as
TeXLive, tlmgr is a great start. I'm sure it will become even better
in the months and years to come.
On Sep 8, 2008, at 9:10 PM, Herbert Schulz wrote:
> On Sep 8, 2008, at 7:30 PM, Vincent McGarry wrote:
>> Well, I did get it going, but the process seems very quirky, to
>> say the least. I've gotten the announcement of items installed by
>> tlmgr being newer than on the server. I've also seen perl stop
>> operating. That froze the download. But the download will freeze
>> even if perl continues to operate. It always seems to freeze on
>> install, not remove. This concerns me---I noticed it happen with
>> the caption package and it was after several attempts at using
>> tlmgr, where some other files were updated before the freezes,
>> that I finally saw caption installed.
>> Vince McGarry
> After losing caption.sty I've given up, for now, with using tlmgr.
> I re-installed MacTeX-2008 and will leave it that way for the near
> Good Luck,
> Herb Schulz
> (herbs at wideopenwest.com)
> ----------- Please Consult the Following Before Posting -----------
> TeX FAQ: http://www.tex.ac.uk/faq
> List Reminders and Etiquette: http://www.esm.psu.edu/mac-tex/list/
> List Archive: http://tug.org/pipermail/macostex-archives/
> TeX on Mac OS X Website: http://mactex-wiki.tug.org/
> List Info: http://email.esm.psu.edu/mailman/listinfo/macosx-tex
More information about the macostex-archives