texlive[51517] Master/tlpkg/installer/install-tl-gui.tcl: Take

commits+siepo at tug.org commits+siepo at tug.org
Mon Jul 1 16:32:57 CEST 2019


Revision: 51517
          http://tug.org/svn/texlive?view=revision&revision=51517
Author:   siepo
Date:     2019-07-01 16:32:56 +0200 (Mon, 01 Jul 2019)
Log Message:
-----------
Take missing TMPDIR for sudo on Darwin into account

Modified Paths:
--------------
    trunk/Master/tlpkg/installer/install-tl-gui.tcl

Modified: trunk/Master/tlpkg/installer/install-tl-gui.tcl
===================================================================
--- trunk/Master/tlpkg/installer/install-tl-gui.tcl	2019-07-01 00:00:36 UTC (rev 51516)
+++ trunk/Master/tlpkg/installer/install-tl-gui.tcl	2019-07-01 14:32:56 UTC (rev 51517)
@@ -130,13 +130,17 @@
 # write to a logfile which is shared with the backend.
 # both parties open, append and close every time.
 
-if {$::tcl_platform(os) eq "Darwin"} {
-  set ::dblfile "$::env(TMPDIR)/dblog"
-} elseif {$::tcl_platform(platform) eq "unix"} {
-  set ::dblfile "/tmp/dblog"
-} else {
-  set ::dblfile "$::env(TEMP)/dblog.txt"
+set dblogdir "/tmp"
+if [info exists ::env(TMPDIR)] {
+  set dblogdir $::env(TMPDIR)
+} elseif [info exists ::env(TMP)] {
+  set dblogdir $::env(TMP)
+} elseif [info exists ::env(TEMP)] {
+  set dblogdir $::env(TEMP)
 }
+set ::dblfile [file join $dblogdir "dblog"]
+unset dblogdir
+
 proc dblog {s} {
   set db [open $::dblfile a]
   set t [get_stacktrace]
@@ -1856,6 +1860,7 @@
   if [catch {open $cmd r+} ::inst] {
     err_exit "Error starting Perl backend"
   }
+
   show_time "opened pipe"
   set ::perlpid [pid $::inst]
 



More information about the tex-live-commits mailing list