texlive[50726] Master/texmf-dist/scripts/tlshell/tlshell.tcl:

commits+siepo at tug.org commits+siepo at tug.org
Wed Apr 3 22:34:55 CEST 2019


Revision: 50726
          http://tug.org/svn/texlive?view=revision&revision=50726
Author:   siepo
Date:     2019-04-03 22:34:55 +0200 (Wed, 03 Apr 2019)
Log Message:
-----------
Writability test at start; display TL root

Modified Paths:
--------------
    trunk/Master/texmf-dist/scripts/tlshell/tlshell.tcl

Modified: trunk/Master/texmf-dist/scripts/tlshell/tlshell.tcl
===================================================================
--- trunk/Master/texmf-dist/scripts/tlshell/tlshell.tcl	2019-04-03 19:29:11 UTC (rev 50725)
+++ trunk/Master/texmf-dist/scripts/tlshell/tlshell.tcl	2019-04-03 20:34:55 UTC (rev 50726)
@@ -29,8 +29,9 @@
   unset dirs
 }
 
+set ::instroot [exec kpsewhich -var-value=TEXMFROOT]
+
 # declarations and utilities shared with install-tl-gui.tcl
-set ::instroot [exec kpsewhich -var-value=TEXMFROOT]
 source [file join $::instroot "tlpkg" "tltcl" "tltcl.tcl"]
 
 # now is a good time to ask tlmgr for the _TL_ name of our platform
@@ -2091,6 +2092,8 @@
 
   # right frame
   ppack [ttk::frame .topfr] -in .topf -side right -anchor ne
+  pack [ttk::label .topfr.lroot] -side top -anchor e
+  .topfr.lroot configure -text [__ "Root at %s" $::instroot]
   pack [ttk::label .topfr.linfra] -side top -anchor e
   pack [ttk::label .topfr.lshell] -side top -anchor e
 
@@ -2284,6 +2287,14 @@
 
   populate_main
 
+  # testing writablilty earlier led to sizing problems
+  if {! [file writable $::instroot]} {
+    set ans [tk_messageBox -type yesno -icon warning -message \
+         [__ "%s is not writable. You can probably not do much.
+  Are you sure you want to continue?" $::instroot]]
+    if {$ans ne "yes"} {exit}
+  }
+
   start_tlmgr
   get_repos_from_tlmgr
   .topfl.lrepos configure -text [print_repos]



More information about the tex-live-commits mailing list