Discussion:
[tex-live] Current TeX Live Utility fails to update
Uri Blumenthal
2018-08-02 23:14:44 UTC
Permalink
Failure to update the texlive.infra:

2018-08-02 23:07:08 +0000 Notice +[TLMEnvironment initialize][22426] Welcome to TeX Live Utility 1.34, running under Mac OS X Version 10.13.6 (Build 17G65) with 4/4 processors active and 8.0 GB physical memory.
2018-08-02 23:07:08 +0000 Notice +[TLMEnvironment _checkProcessUmask][22426] Process umask = 022
2018-08-02 23:07:08 +0000 Notice __TLMCheckWgetrc[22426] *** WARNING *** ~/.wgetrc exists. If you encounter problems, ensure that it does not conflict with system proxy settings.
2018-08-02 23:07:08 +0000 Notice +[TLMEnvironment updateEnvironment][22426] Setting up a new environment for /usr/local/texlive/2018

2018-08-02 23:07:08 +0000 Notice +[TLMEnvironment updatePathEnvironment][22426] Using PATH = "(
"/opt/local/bin",
"/usr/bin",
"/bin",
"/usr/sbin",
"/sbin",
"/usr/local/texlive/2018/bin/x86_64-darwin"
)"
2018-08-02 23:07:09 +0000 Notice +[TLMEnvironment _checkSystemPythonMajorVersion:minorVersion:][22426] Using python at '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python'
2018-08-02 23:07:09 +0000 Notice +[TLMEnvironment _checkSystemPythonMajorVersion:minorVersion:][22426] Python version is 2.7.15 (default, May 2 2018, 00:53:27)
[GCC 4.2.1 Compatible Apple LLVM 9.1.0 (clang-902.0.39.1)]
2018-08-02 23:07:09 +0000 Notice +[TLMEnvironment updateEnvironment][22426] Nothing to update for /usr/local/texlive/2018
2018-08-02 23:07:09 +0000 Notice -[TLMDatabase _downloadDatabaseHead][22426] Checking the repository version. Please be patient.
2018-08-02 23:07:09 +0000 Notice -[TLMDatabase _downloadDatabaseHead][22426] Downloading at least 2048 bytes of tlpdb for a version check

2018-08-02 23:07:09 +0000 Notice -[TLMDatabase _downloadDatabaseHead][22426] Downloaded 131072 bytes of tlpdb for version check
2018-08-02 23:07:09 +0000 Notice -[TLMEnvironment initWithInstallDirectory:][22426] Looks like you're using TeX Live 2018
2018-08-02 23:07:09 +0000 Notice -[TLMEnvironment _checkForRootPrivileges][22426] Root permission required for installation at /usr/local/texlive/2018
2018-08-02 23:07:09 +0000 Notice +[TLMEnvironment _logEnvironment][22426] Current environment from /usr/bin/env:
__CF_USER_TEXT_ENCODING=0x1F5:0x0:0x0
Apple_PubSub_Socket_Render=/private/tmp/com.apple.launchd.1F2DLr9uPs/Render
CC_FOR_BUILD=no_compiler_found
DBUS_LAUNCHD_SESSION_BUS_SOCKET=/private/tmp/com.apple.launchd.hbkNiZGx7B/unix_domain_listener
DISPLAY=/private/tmp/com.apple.launchd.kHjruoKkoH/org.macosforge.xquartz:0
HOME=/Users/uri
LOGNAME=uri
PATH=/opt/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/texlive/2018/bin/x86_64-darwin
SHELL=/bin/bash
SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.NyMXIj8GpS/Listeners
TMPDIR=/var/folders/pd/mxn5kp_55jg23x7jjd10gtwm0000gn/T/
USER=uri
XPC_FLAGS=0x0
XPC_SERVICE_NAME=0
2018-08-02 23:07:09 +0000 Notice -[TLMDatabase _reloadFromLocalFile][22426] Reloading local tlpdb from file:///usr/local/texlive/2018/tlpkg/texlive.tlpdb
2018-08-02 23:07:12 +0000 Notice -[TLMDatabase _reloadFromLocalFile][22426] Took 2.78 seconds to reload local tlpdb
2018-08-02 23:07:12 +0000 Notice -[TLMDatabase _downloadDatabaseHead][22426] Checking the repository version. Please be patient.
2018-08-02 23:07:12 +0000 Notice -[TLMDatabase _downloadDatabaseHead][22426] Downloading at least 2048 bytes of tlpdb for a version check

2018-08-02 23:07:12 +0000 Notice -[TLMDatabase _downloadDatabaseHead][22426] Downloaded 5547 bytes of tlpdb for version check
2018-08-02 23:07:12 +0000 Notice -[TLMEnvironment _getValidServerURL:repositoryYear:fromURL:][22426] Repository version appears to be 2018; a young TeX Live
2018-08-02 23:07:12 +0000 Notice -[TLMMainWindowController _refreshUpdatedPackageListFromLocation:][22426] Refreshing list of updated packages

2018-08-02 23:07:15 +0000 Notice -[TLMMainWindowController _paperSizeCheckTerminated:][22426] System paper size = letter, pdftex paper size = letter
2018-08-02 23:07:16 +0000 Notice -[TLMOperation main][22426] Successfully executed `/usr/local/texlive/2018/bin/x86_64-darwin/tlmgr --machine-readable --repository http://tug.ctan.org/tex-archive/systems/texlive/tlnet update --list --all`
2018-08-02 23:07:17 +0000 Notice -[TLMMainWindowController _handleListUpdatesFinishedNotification:][22426] Critical updates detected: (
"texlive.infra"
)
2018-08-02 23:07:19 +0000 Notice -[TLMMainWindowController _isCorrectDatabaseVersionAtURL:][22426] Checking database version in case preferences have been changed

2018-08-02 23:07:19 +0000 Notice -[TLMMainWindowController _updateAllPackagesFromRepository:][22426] Beginning infrastructure update from http://tug.ctan.org/tex-archive/systems/texlive/tlnet
2018-08-02 23:07:19 +0000 Notice -[TLMInfraUpdateOperation _synchronouslyDownloadURL:toPath:][22426] Downloading URL: http://tug.ctan.org/tex-archive/systems/texlive/tlnet/update-tlmgr-latest.sh
2018-08-02 23:07:19 +0000 Notice -[TLMInfraUpdateOperation download:willSendRequest:redirectResponse:][22426] Download redirected to http://tug.ctan.org/tex-archive/systems/texlive/tlnet/update-tlmgr-latest.sh, expecting 0 bytes.
2018-08-02 23:07:19 +0000 Notice -[TLMInfraUpdateOperation download:didReceiveResponse:][22426] Will download 4284450 bytes

2018-08-02 23:07:20 +0000 Notice -[TLMInfraUpdateOperation download:didReceiveDataOfLength:][22426] Received 20% of 4284450 bytes

2018-08-02 23:07:20 +0000 Notice -[TLMInfraUpdateOperation download:didReceiveDataOfLength:][22426] Received 41% of 4284450 bytes

2018-08-02 23:07:20 +0000 Notice -[TLMInfraUpdateOperation download:didReceiveDataOfLength:][22426] Received 62% of 4284450 bytes

2018-08-02 23:07:20 +0000 Notice -[TLMInfraUpdateOperation download:didReceiveDataOfLength:][22426] Received 82% of 4284450 bytes

2018-08-02 23:07:20 +0000 Notice -[TLMInfraUpdateOperation downloadDidFinish:][22426] Download of 4284450 bytes complete
2018-08-02 23:07:20 +0000 Notice -[TLMInfraUpdateOperation _downloadUpdateScript][22426] First line of downloaded file is: "#!/bin/sh"
good!
2018-08-02 23:07:20 +0000 Notice -[TLMInfraUpdateOperation _synchronouslyDownloadURL:toPath:][22426] Downloading URL: http://tug.ctan.org/tex-archive/systems/texlive/tlnet/update-tlmgr-latest.sh.sha512
2018-08-02 23:07:20 +0000 Notice -[TLMInfraUpdateOperation download:willSendRequest:redirectResponse:][22426] Download redirected to http://tug.ctan.org/tex-archive/systems/texlive/tlnet/update-tlmgr-latest.sh.sha512, expecting 0 bytes.
2018-08-02 23:07:20 +0000 Notice -[TLMInfraUpdateOperation download:didReceiveResponse:][22426] Will download 153 bytes

2018-08-02 23:07:20 +0000 Notice -[TLMInfraUpdateOperation download:didReceiveDataOfLength:][22426] Received 100% of 153 bytes

2018-08-02 23:07:20 +0000 Notice -[TLMInfraUpdateOperation downloadDidFinish:][22426] Download of 153 bytes complete
2018-08-02 23:07:20 +0000 Notice -[TLMInfraUpdateOperation _compare512][22426] SHA512 signature looks okay
2018-08-02 23:07:20 +0000 Notice -[TLMAuthorizedOperation main][22426] Checking code signature before running tlu_ipctask as root

2018-08-02 23:07:20 +0000 Notice /usr/bin/codesign[22426] /Applications/TeX Live Utility.app/Contents/MacOS/tlu_ipctask: valid on disk
/Applications/TeX Live Utility.app/Contents/MacOS/tlu_ipctask: satisfies its Designated Requirement
2018-08-02 23:07:20 +0000 Notice -[TLMAuthorizedOperation main][22426] Signature was valid, okay to run tlu_ipctask
2018-08-02 23:07:31 +0000 Notice -[TLMAuthorizedOperation main][22426] Invoking privileged task via AuthorizationExecuteWithPrivileges
2018-08-02 23:07:31 +0000 Notice tlu_ipctask[22577] dropped privileges to user nobody
2018-08-02 23:07:32 +0000 Notice -[TLMAuthorizedOperation setWrapperPID:][22426] tlu_ipctask checking in: tlu_ipctask pid = 22577
2018-08-02 23:07:33 +0000 Notice -[TLMAuthorizedOperation setUnderlyingPID:][22426] tlu_ipctask checking in: pid = 22578 (/var/folders/pd/mxn5kp_55jg23x7jjd10gtwm0000gn/T/TLMInfraUpdateOperation.NJs2Q9/update-tlmgr-latest.sh --nox11)
2018-08-02 23:07:33 +0000 Notice tlu_ipctask[22577] tlu_ipctask: child HOME = '/var/root'
2018-08-02 23:07:33 +0000 Notice tlu_ipctask[22577] tlu_ipctask: current HOME = '/var/empty'
2018-08-02 23:07:33 +0000 Notice tlu_ipctask[22577] Verifying archive integrity... All good.
2018-08-02 23:07:33 +0000 Notice tlu_ipctask[22577] Uncompressing TeX Live Manager Updater
2018-08-02 23:07:33 +0000 Warning tlu_ipctask[22577] 0%  98%  100% ./runme.sh: Cannot find TeX Live root using kpsewhich --var-value=SELFAUTOPARENT.
2018-08-02 23:07:33 +0000 Warning tlu_ipctask[22577] ./runme.sh: (no tlpkg/texlive.tlpdb and/or tlpkg/tlpobj/.)
2018-08-02 23:07:33 +0000 Warning tlu_ipctask[22577] ./runme.sh: Please set your PATH as needed, otherwise it's hopeless.
2018-08-02 23:07:33 +0000 Notice -[TLMAuthorizedOperation _runUntilChildExit][22426] kqueue noted that pid 22578 exited (/var/folders/pd/mxn5kp_55jg23x7jjd10gtwm0000gn/T/TLMInfraUpdateOperation.NJs2Q9/update-tlmgr-latest.sh --nox11)
2018-08-02 23:07:33 +0000 Notice tlu_ipctask[22577] child process pid = 22578 exited
2018-08-02 23:07:34 +0000 Error tlu_ipctask[22577] Value of errno is Operation not permitted
2018-08-02 23:07:34 +0000 Error tlu_ipctask[22577] *** ERROR *** exit status of pid = 22578 was 1
2018-08-02 23:07:34 +0000 Notice -[TLMAuthorizedOperation _runUntilChildExit][22426] waitpid returned 22577, WIFEXITED(256) = 1, errno = 9 (No error)
2018-08-02 23:07:34 +0000 Notice -[TLMAuthorizedOperation _runUntilChildExit][22426] kqueue noted that tlu_ipctask (pid = 22577) exited with status 1
2018-08-02 23:07:34 +0000 Notice -[TLMInfraUpdateOperation main][22426] Removed temp directory "/var/folders/pd/mxn5kp_55jg23x7jjd10gtwm0000gn/T/TLMInfraUpdateOperation.NJs2Q9"
2018-08-02 23:07:38 +0000 Notice -[TLMLogWindowController awakeFromNib][22426] Loaded log window controller

It complains about kpsewhich, but when I run it from the terminal (i.e., without that “PATH sanitization”), it seems to give a reasonable enough answer:

$ kpsewhich --var-value=SELFAUTOPARENT
/usr/local/texlive/2018
$
Norbert Preining
2018-08-03 01:39:46 UTC
Permalink
On Thu, 02 Aug 2018, Uri Blumenthal wrote:
> Uncompressing TeX Live Manager Updater
> ./runme.sh: Cannot find TeX Live root using kpsewhich --var-value=SELFAUTOPARENT.
> ./runme.sh: (no tlpkg/texlive.tlpdb and/or tlpkg/tlpobj/.)
> ./runme.sh: Please set your PATH as needed, otherwise it's hopeless.

The log file contained clear indications - it seems that
kpsewhich --var-value=SELFAUTOPARENT
did not return anything useful. In this case the updated cannot work.

But since it works on the command line:

> $ kpsewhich --var-value=SELFAUTOPARENT
> /usr/local/texlive/2018

I guess that - because TLU is cleaning the PATH before starting, your TL
is not found ...

Please ask on the Mactex mailing list or TLU issue tracker.

Thanks

Norbert

--
PREINING Norbert http://www.preining.info
Accelia Inc. + JAIST + TeX Live + Debian Developer
GPG: 0x860CDC13 fp: F7D8 A928 26E3 16A1 9FA0 ACF0 6CAC A448 860C DC13
Adam R. Maxwell
2018-08-03 02:00:44 UTC
Permalink
> On Aug 2, 2018, at 18:39 , Norbert Preining <***@logic.at> wrote:
>
> On Thu, 02 Aug 2018, Uri Blumenthal wrote:
>> Uncompressing TeX Live Manager Updater
>> ./runme.sh: Cannot find TeX Live root using kpsewhich --var-value=SELFAUTOPARENT.
>> ./runme.sh: (no tlpkg/texlive.tlpdb and/or tlpkg/tlpobj/.)
>> ./runme.sh: Please set your PATH as needed, otherwise it's hopeless.
>
> The log file contained clear indications - it seems that
> kpsewhich --var-value=SELFAUTOPARENT
> did not return anything useful. In this case the updated cannot work.

In Terminal, what is the output of

which kpsewhich

and

$(defaults read com.googlecode.mactlmgr.tlu TLMTexBinPathPreferenceKey)/kpsewhich --var-value=SELFAUTOPARENT

TLU runs kpsewhich during the launch process, and it would log an error if that failed. I'm not sure why it's failing in update-tlmgr-latest.sh, unless you have another kpsewhich.

-- adam
Uri Blumenthal
2018-08-03 02:33:40 UTC
Permalink
On Aug 2, 2018, at 22:00 , Adam R. Maxwell <***@mac.com<mailto:***@mac.com>> wrote:
On Aug 2, 2018, at 18:39 , Norbert Preining <***@logic.at<mailto:***@logic.at>> wrote:
On Thu, 02 Aug 2018, Uri Blumenthal wrote:
Uncompressing TeX Live Manager Updater
./runme.sh: Cannot find TeX Live root using kpsewhich --var-value=SELFAUTOPARENT.
./runme.sh: (no tlpkg/texlive.tlpdb and/or tlpkg/tlpobj/.)
./runme.sh: Please set your PATH as needed, otherwise it's hopeless.

The log file contained clear indications - it seems that
kpsewhich --var-value=SELFAUTOPARENT
did not return anything useful. In this case the updated cannot work.

In Terminal, what is the output of

which kpsewhich

It looks like I had two of those. One that I need and use, and the other one that was forced...

$ which kpsewhich
/Library/TeX/texbin/kpsewhich
$ type -all kpsewhich
kpsewhich is /Library/TeX/texbin/kpsewhich
$ ll /Library/TeX/texbin/kpsewhich /opt/local/bin/kpsewhich
-rwxr-xr-x 1 uri wheel 89036 May 9 18:06 /Library/TeX/texbin/kpsewhich*
lrwxr-xr-x 1 root admin 45 Jun 19 07:10 /opt/local/bin/kpsewhich@ -> /opt/local/libexec/texlive/binaries/kpsewhich
$ ll /opt/local/libexec/texlive/binaries/kpsewhich
-rwxr-xr-x 1 root admin 20692 Jul 23 17:59 /opt/local/libexec/texlive/binaries/kpsewhich*
$ /Library/TeX/texbin/kpsewhich --var-value SELFAUTOPARENT
/usr/local/texlive/2018
$ /opt/local/libexec/texlive/binaries/kpsewhich --var-value SELFAUTOPARENT
/opt/local/libexec
$

and

$(defaults read com.googlecode.mactlmgr.tlu TLMTexBinPathPreferenceKey)/kpsewhich --var-value=SELFAUTOPARENT

It appears to give the correct answer:

$ $(defaults read com.googlecode.mactlmgr.tlu TLMTexBinPathPreferenceKey)/kpsewhich --var-value=SELFAUTOPARENT
/usr/local/texlive/2018
$


TLU runs kpsewhich during the launch process, and it would log an error if that failed. I'm not sure why it's failing in update-tlmgr-latest.sh, unless you have another kpsewhich.

Yes. Some application packages required Macports-installed "texlive-bin”.

$ port provides /opt/local/libexec/texlive/binaries/kpsewhich
/opt/local/libexec/texlive/binaries/kpsewhich is provided by: texlive-bin
$

Since some packages (like OpenSC) come with documentation in XML, they may require “dblatex” to convert it to something useful - and “dblatex” requires “texlive-bin”
 But for now I’ve deleted the whole bunch, as my TeX needs are served by MacTeX.pkg anyway.

Thanks!
Mojca Miklavec
2018-08-03 05:24:51 UTC
Permalink
Hi,

I've been running MacTeX in parallel to MacPorts for years without any
issues, just making sure that MacTeX's path came in front of MacPorts.
What probably broke it for you is that you must have selected TeX from
MacPorts to be your main distribution (probably in TLU as the old
preference pane is probably dead by now?) and then tried to update it
(TeX provided by MacPorts) via TLU. This has no chance to work. (This
can be seen from the fact that /Library/TeX/texbin pointed to
MacPorts.) You also have /opt/local/bin in front of the bin folder for
MacTeX. Putting MacTeX's path in front would certainly help.

Mojca
Adam R. Maxwell
2018-08-03 05:32:40 UTC
Permalink
> On Aug 2, 2018, at 22:24 , Mojca Miklavec <***@gmail.com> wrote:
>
> You also have /opt/local/bin in front of the bin folder for
> MacTeX. Putting MacTeX's path in front would certainly help.

This was the problem; it had nothing to do with the prefpane.
The next release of TeX Live Utility will prepend the TL path
to whatever is in /etc/paths instead of appending it. Hopefully
nothing else breaks from that change.

-- adam
Mojca Miklavec
2018-08-03 05:43:06 UTC
Permalink
On 3 August 2018 at 07:32, Adam R. Maxwell wrote:
> On Aug 2, 2018, at 22:24 , Mojca Miklavec wrote:
>
>> You also have /opt/local/bin in front of the bin folder for
>> MacTeX. Putting MacTeX's path in front would certainly help.
>
> This was the problem; it had nothing to do with the prefpane.
> The next release of TeX Live Utility will prepend the TL path
> to whatever is in /etc/paths instead of appending it. Hopefully
> nothing else breaks from that change.

I'm sorry. I must have misinterpreted the following (I didn't notice
two arguments in the command):

$ ll /Library/TeX/texbin/kpsewhich /opt/local/bin/kpsewhich
-rwxr-xr-x 1 uri wheel 89036 May 9 18:06 /Library/TeX/texbin/kpsewhich*
lrwxr-xr-x 1 root admin 45 Jun 19 07:10
/opt/local/bin/kpsewhich@ ->
/opt/local/libexec/texlive/binaries/kpsewhich

Mojca
Uri Blumenthal
2018-08-03 06:22:14 UTC
Permalink
My PATH was set so that MacTeX (/Library/TeX/bin) was ahead of /opt/local/bin, precisely for that reason (and that's why running tlmgr from the Terminal worked).

Completely removing /opt/local/bin seems impractical, as that's where the current Perl, Python, and GnuPG live (and for GnuPG the only alternative location is /usr/local/MacGPG2/bin).

Path sanitization killed the MacTeX location, leaving available only Macports kpsewhich.

I suspect there can be issues with curl as well, because the version included with MacOS is less than perfect.

I think that allowing the user to specify which executables to use (instead of basing these decisions on directory path alone) would be better. Example: working kpsewhich is in /Library/TeX/bin, working wget, curl and gpg - in /opt/local/bin...

Sent from my test iPhone

> On Aug 3, 2018, at 01:43, Mojca Miklavec <***@gmail.com> wrote:
>
>> On 3 August 2018 at 07:32, Adam R. Maxwell wrote:
>>> On Aug 2, 2018, at 22:24 , Mojca Miklavec wrote:
>>>
>>> You also have /opt/local/bin in front of the bin folder for
>>> MacTeX. Putting MacTeX's path in front would certainly help.
>>
>> This was the problem; it had nothing to do with the prefpane.
>> The next release of TeX Live Utility will prepend the TL path
>> to whatever is in /etc/paths instead of appending it. Hopefully
>> nothing else breaks from that change.
>
> I'm sorry. I must have misinterpreted the following (I didn't notice
> two arguments in the command):
>
> $ ll /Library/TeX/texbin/kpsewhich /opt/local/bin/kpsewhich
> -rwxr-xr-x 1 uri wheel 89036 May 9 18:06 /Library/TeX/texbin/kpsewhich*
> lrwxr-xr-x 1 root admin 45 Jun 19 07:10
> /opt/local/bin/kpsewhich@ ->
> /opt/local/libexec/texlive/binaries/kpsewhich
>
> Mojca
Adam R. Maxwell
2018-08-03 15:10:54 UTC
Permalink
> On Aug 2, 2018, at 23:22 , Uri Blumenthal <***@mit.edu> wrote:
>
> My PATH was set so that MacTeX (/Library/TeX/bin) was ahead of /opt/local/bin, precisely for that reason (and that's why running tlmgr from the Terminal worked).
>
> Completely removing /opt/local/bin seems impractical, as that's where the current Perl, Python, and GnuPG live (and for GnuPG the only alternative location is /usr/local/MacGPG2/bin).
>
> Path sanitization killed the MacTeX location, leaving available only Macports kpsewhich.

No, your /etc/paths customization killed TeX Live, and your complaining is pushing me close to ignoring /etc/paths in future.

> I suspect there can be issues with curl as well, because the version included with MacOS is less than perfect.
>
> I think that allowing the user to specify which executables to use (instead of basing these decisions on directory path alone) would be better. Example: working kpsewhich is in /Library/TeX/bin, working wget, curl and gpg - in /opt/local/bin...

I also thought that when I first released TeX Live Utility a decade ago. Unfortunately, it was impractical. Broken Python installs alone have taken days of tedious email exchanges like this to debug, so now it's mostly childproofed against clever or absentminded users.

-- adam
Uri Blumenthal
2018-08-03 16:04:18 UTC
Permalink
On Aug 3, 2018, at 11:11, Adam R. Maxwell <***@me.com> wrote:
>> I think that allowing the user to specify which executables to use (instead of basing these decisions on directory path alone) would be better. Example: working kpsewhich is in /Library/TeX/bin, working wget, curl and gpg - in /opt/local/bin...
>
> I also thought that when I first released TeX Live Utility a decade ago. Unfortunately, it was impractical. Broken Python installs alone have taken days of tedious email exchanges like this to debug, so now it's mostly childproofed against clever or absentminded users.


I understand the problem you're describing. But the one I described is also real.
Loading...