texlive[55535] Master: Fixes for portable installation

commits+siepo at tug.org commits+siepo at tug.org
Sat Jun 13 22:03:38 CEST 2020


Revision: 55535
          http://tug.org/svn/texlive?view=revision&revision=55535
Author:   siepo
Date:     2020-06-13 22:03:38 +0200 (Sat, 13 Jun 2020)
Log Message:
-----------
Fixes for portable installation

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

Modified: trunk/Master/install-tl
===================================================================
--- trunk/Master/install-tl	2020-06-13 09:08:10 UTC (rev 55534)
+++ trunk/Master/install-tl	2020-06-13 20:03:38 UTC (rev 55535)
@@ -1331,13 +1331,14 @@
   my $yyyy = $TeXLive::TLConfig::ReleaseYear;
 
   # we have to find TEXMFLOCAL TEXMFSYSVAR and TEXMFHOME
+  # at this point, a final slash of $vars{TEXDIR} itself has already
+  # been removed.
   foreach my $line (@texmfcnflines) {
     if ($line =~ m/^TEXMFLOCAL\b/) { # don't find TEXMFLOCALEDIR
       # by default TEXMFLOCAL = TEXDIR/../texmf-local, if this is the case
       # we don't have to write a new setting.
-      my $deftmlocal = dirname($vars{'TEXDIR'});
-      $deftmlocal .= "/texmf-local";
-      if ("$vars{'TEXMFLOCAL'}" ne "$deftmlocal") {
+      my $deftmflocal = Cwd::abs_path($vars{'TEXDIR'}.'/../texmf-local');
+      if (Cwd::abs_path($vars{TEXMFLOCAL}) ne "$deftmflocal") {
         push @changedtmf, "TEXMFLOCAL = $vars{'TEXMFLOCAL'}\n";
       }
     } elsif ($line =~ m/^TEXMFSYSVAR/) {
@@ -1348,15 +1349,15 @@
       if ("$vars{'TEXMFSYSCONFIG'}" ne "$vars{'TEXDIR'}/texmf-config") {
         push @changedtmf, "TEXMFSYSCONFIG = $vars{'TEXMFSYSCONFIG'}\n";
       }
-    } elsif ($line =~ m/^TEXMFVAR/) {
+    } elsif ($line =~ m/^TEXMFVAR/ && !$vars{'instopt_portable'}) {
       if ($vars{"TEXMFVAR"} ne "~/.texlive$yyyy/texmf-var") {
         push @changedtmf, "TEXMFVAR = $vars{'TEXMFVAR'}\n";
       }
-    } elsif ($line =~ m/^TEXMFCONFIG/) {
+    } elsif ($line =~ m/^TEXMFCONFIG/ && !$vars{'instopt_portable'}) {
       if ("$vars{'TEXMFCONFIG'}" ne "~/.texlive$yyyy/texmf-config") {
         push @changedtmf, "TEXMFCONFIG = $vars{'TEXMFCONFIG'}\n";
       }
-    } elsif ($line =~ m/^TEXMFHOME/) {
+    } elsif ($line =~ m/^TEXMFHOME/ && !$vars{'instopt_portable'}) {
       if ("$vars{'TEXMFHOME'}" ne "~/texmf") {
         push @changedtmf, "TEXMFHOME = $vars{'TEXMFHOME'}\n";
       }
@@ -1392,6 +1393,11 @@
     s/^(TEXMF\w+\s*=\s*)\Q$vars{'TEXDIR'}\E/$1\$SELFAUTOPARENT/;
     print TMF;
   }
+  if ($vars{'instopt_portable'}) {
+    print TMF "TEXMFHOME = \$TEXMFLOCAL\n";
+    print TMF "TEXMFVAR = \$TEXMFSYSVAR\n";
+    print TMF "TEXMFCONFIG = \$TEXMFSYSCONFIG\n";
+  }
   #
   # save the setting of shell_escape to the generated system texmf.cnf
   # default in texmf-dist/web2c/texmf.cnf is

Modified: trunk/Master/tlpkg/installer/install-tl-gui.tcl
===================================================================
--- trunk/Master/tlpkg/installer/install-tl-gui.tcl	2020-06-13 09:08:10 UTC (rev 55534)
+++ trunk/Master/tlpkg/installer/install-tl-gui.tcl	2020-06-13 20:03:38 UTC (rev 55535)
@@ -600,7 +600,11 @@
   }
   commit_canonical_local
 
-  if {$::vars(instopt_portable)} reset_personal_dirs
+  if {$::vars(instopt_portable)} {
+    set ::vars(TEXMFHOME) $::vars(TEXMFLOCAL)
+    set ::vars(TEXMFVAR) $::vars(TEXMFSYSVAR)
+    set ::vars(TEXMFCONFIG) $::vars(TEXMFSYSCONFIG)
+  }
   destroy .tltd
 }
 



More information about the tex-live-commits mailing list.