Re: Critical infrastructure update failing in TLU alone

Bruno Voisin <[email protected]>
Newsgroups gmane.comp.tex.live
Message-ID <[email protected]>
To summarize things for readers of this thread, and answer one of your suggestions:

> Karl wrote:
> 
> You could edit runme.sh (after unpacking as I wrote in my previous msg)
> and add 
>  echo "$PATH"
> before the line that calls kpsewhich, which is:
>  ROOT=`kpsewhich --var-value=SELFAUTOPARENT`

Unfortunately this can't be done in the present case, as the problem arises when TeX Live Utility downloads update-tlmgr-latest.sh from CTAN, uncompresses and runs it, with no user intervention in between. It doesn't arise when update-tlmgr-latest.sh is run by the user in Terminal. If there is a way to get TLU to use a local copy of update-tlmgr-latest.sh, I don't know how.

Fortunately, this wasn't necessary eventually. Thanks to your update and to Adam's suggestion

> Karl wrote:
> 
> Except this makes me realize that I should make the error message show
> the PATH being used. So I added that for tonight's update.  Now it looks
> like this (Master/tlpkg/bin/tl-makeself-from-tlnet):
> 
>  $0: Cannot find TeX Live root using kpsewhich --var-value=SELFAUTOPARENT
>  $0: (no tlpkg/texlive.tlpdb and/or tlpkg/tlpobj/.)
>  $0: Please set your PATH as needed, otherwise it's hopeless. Current PATH:
>  $0:   $PATH

> Adam wrote:
> 
> Give this a try, and you should see what PATH is for the privileged task when you try updating:
> 
> sudo -H defaults write com.googlecode.mactlmgr.tlmgr_cwrapper LogEnvironment -bool TRUE


it's been possible to diagnose the issue. TLU sets PATH to

PATH=/Library/TeX/texbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin

upon startup (/Library/TeX/texbin being the location of the TeX binaries in MacTeX). Then it launches update-tlmgr-latest.sh as a subprocess, using the macOS command AuthorizationExecuteWithPrivileges().

The subprocess used to inherit PATH from the process calling it. With the latest macOS 27.0 betas it doesn't, and the subprocess has instead

PATH=/usr/bin:/bin:/usr/sbin:/sbin

preventing kpsewhich from being found.

The last time I performed a successful infrastructure update was on macOS 27.0 Beta 3. The first time I got an unsuccessful update was on macOS 27.0 Beta 5. So the change of behaviour in macOS occurred between these two.

I have reported this as a bug to Apple. We'll see what happens.

Bruno
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.