mathtime-installer
mathtime-installer copied to clipboard
Requires sudo and damages a TeXLive installation
The default and preferred mode of installation of TL is to install as a normal user and NOT as root, leaving (and requiring) that all installed file be owned by the user who installed TL.
mtpro2-texlive.sh
currently asks the user to sudo
and finishes off the installation as "root" changing the ownership of the files:
./texmf-config/ls-R
./texmf-config/web2c
./texmf-config/web2c/updmap.cfg
./texmf-dist/ls-R
./texmf-var/ls-R
./texmf-var/fonts/map/dvips/updmap/psfonts.map
./texmf-var/fonts/map/pdftex/updmap/pdftex.map
to "root" and leaving them that way. This breaks a TL installation made as-a-normal user and one is not even able to run a tlmgr --update
after that, because a normal user is not able to update those files any longer.
SOLUTION: A TL installation should either be done by a normal-user or by root, with normal user being the preferred mode. Absolutely no installation should have some files owned by a normal user and some owned by root, because it breaks several different TL utilities.
The installation being done by mtpro2-texlive.sh
should not need to sudo, and should complete without the requirement.
If a TL installation is already broken (or semi-functional) with files owned by more than one user, then mtpro2-texlive.sh
could make an exception and in that case "sudo". The installed fonts should work after that, but any update from that point on would require sudo as well.
It would be a nice feature ... to test the ownership of those files that need updating (and so deciding if sudo would be necessary) before going into the script, and informing the user of the necessity of sudo to finish the installation of the fonts.
Right, should not be too hard...I wonder does the script work for your situation when you just remove all the sudos from the script?
Sorry for taking so long to answer.
Indeed if you remove all the "sudo" commands from the script it does work -- if you have an installation tree that is fully owned by the user doing the installing.
It does NOT work if the tree is partially owned by root and partially by the user (along crucial files) . In that case only the intial script with all "sudo" will work.
So basically, one should change it to test ownership of the TL tree at the start of the script and
if mixed --> run the script under sudo
if uniformly owned by the user --> run the script without the sudo
In this situation nothing will be broken by the installation of MTPro2, and the commands that worked before would continue to work after.
Alternatively, one could leave things the way they are and just adding something like:
sudo chown -R paulo:users /usr/local/texlive
at the very end. It is a dirty solution, but would do the trick.