texlive[59108] Master/texmf-dist/scripts/texlive/tlmgr.pl:

commits+karl at tug.org commits+karl at tug.org
Fri May 7 00:52:44 CEST 2021


Revision: 59108
          http://tug.org/svn/texlive?view=revision&revision=59108
Author:   karl
Date:     2021-05-07 00:52:43 +0200 (Fri, 07 May 2021)
Log Message:
-----------
(uninstall_texlive): mention that texmfconfig/texmfvar are not touched.

Modified Paths:
--------------
    trunk/Master/texmf-dist/scripts/texlive/tlmgr.pl

Modified: trunk/Master/texmf-dist/scripts/texlive/tlmgr.pl
===================================================================
--- trunk/Master/texmf-dist/scripts/texlive/tlmgr.pl	2021-05-06 21:40:33 UTC (rev 59107)
+++ trunk/Master/texmf-dist/scripts/texlive/tlmgr.pl	2021-05-06 22:52:43 UTC (rev 59108)
@@ -5255,9 +5255,10 @@
     return ($F_OK | $F_NOPOSTACTION);
   }
   my $force = defined($opts{"force"}) ? $opts{"force"} : 0;
+  my $tlroot = $localtlpdb->root;
   if (!$force) {
     print("If you answer yes here the whole TeX Live installation here,\n",
-          "under ", $localtlpdb->root, ", will be removed!\n");
+          "under $tlroot, will be removed!\n");
     print "Remove TeX Live (y/N): ";
     my $yesno = <STDIN>;
     if (!defined($yesno) || $yesno !~ m/^y(es)?$/i) {
@@ -5265,7 +5266,9 @@
       return ($F_OK | $F_NOPOSTACTION);
     }
   }
-  print ("Ok, removing the whole installation:\n");
+  print ("Ok, removing the whole TL installation under: $tlroot\n");
+  
+  print ("symlinks... ");
   TeXLive::TLUtils::remove_symlinks($localtlpdb->root,
     $localtlpdb->platform(),
     $localtlpdb->option("sys_bin"),
@@ -5272,11 +5275,14 @@
     $localtlpdb->option("sys_man"),
     $localtlpdb->option("sys_info"));
   # now remove the rest
+  print ("main dirs... ");
   system("rm", "-rf", "$Master/texmf-dist");
   system("rm", "-rf", "$Master/texmf-doc");
   system("rm", "-rf", "$Master/texmf-var");
   system("rm", "-rf", "$Master/tlpkg");
   system("rm", "-rf", "$Master/bin");
+
+  print ("misc... ");
   system("rm", "-rf", "$Master/readme-html.dir");
   system("rm", "-rf", "$Master/readme-txt.dir");
   for my $f (qw/doc.html index.html install-tl 
@@ -5291,9 +5297,28 @@
   # if they want removal, give them removal. Hopefully they know how to
   # regenerate any changed config files.
   system("rm", "-rf", "$Master/texmf-config");
+  #
   finddepth(sub { rmdir; }, "$Master");
   
-  return -d "$Master";
+  # but not user dirs.
+  chomp (my $texmfconfig = `kpsewhich -var-value=TEXMFCONFIG`);
+  chomp (my $texmfvar = `kpsewhich -var-value=TEXMFVAR`);
+  print <<NOT_REMOVED;
+
+User directories intentionally not touched, removing them is up to you:
+  TEXMFCONFIG=$texmfconfig
+  TEXMFVAR=$texmfvar
+
+NOT_REMOVED
+
+  my $remnants;
+  if (-d $Master) {
+    print "\nSorry, something did not get removed, under: $Master\n";
+    $remnants = 1;
+  } else {
+    $remnants = 0; 
+  }
+  return $remnants;
 }
 
 



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