texlive[54286] Master/texmf-dist/scripts/texlive: tlmgr remove --all:

commits+karl at tug.org commits+karl at tug.org
Fri Mar 13 23:01:43 CET 2020


Revision: 54286
          http://tug.org/svn/texlive?view=revision&revision=54286
Author:   karl
Date:     2020-03-13 23:01:43 +0100 (Fri, 13 Mar 2020)
Log Message:
-----------
tlmgr remove --all: also remove install-tl and texmfcnf.lua

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

Modified: trunk/Master/texmf-dist/scripts/texlive/NEWS
===================================================================
--- trunk/Master/texmf-dist/scripts/texlive/NEWS	2020-03-13 21:07:58 UTC (rev 54285)
+++ trunk/Master/texmf-dist/scripts/texlive/NEWS	2020-03-13 22:01:43 UTC (rev 54286)
@@ -1,10 +1,12 @@
 (This file public domain.  Originally written by Norbert Preining and
 Karl Berry, 2010.)
 
-<li>more specific verification error messages
+<p><b>tlmgr 54285 (released 13mar20):</b>
+<li>tlmgr remove --all also removes install-tl and texmfcnf.lua.
 
 <p><b>tlmgr 54118 (released 7mar20):</b>
 <li>re-initialize LWP connection after 5 errors.
+<li>more specific verification error messages
 
 <p><b>tlmgr 53428 (released 17jan20):</b>
 <li>automatic retry of packages that fail to download.

Modified: trunk/Master/texmf-dist/scripts/texlive/tlmgr.pl
===================================================================
--- trunk/Master/texmf-dist/scripts/texlive/tlmgr.pl	2020-03-13 21:07:58 UTC (rev 54285)
+++ trunk/Master/texmf-dist/scripts/texlive/tlmgr.pl	2020-03-13 22:01:43 UTC (rev 54286)
@@ -5197,9 +5197,12 @@
     return ($F_ERROR);
   }
   return if !check_on_writable();
+
+  init_local_db(0);
   my $force = defined($opts{"force"}) ? $opts{"force"} : 0;
   if (!$force) {
-    print("If you answer yes here the whole TeX Live installation will be removed!\n");
+    print("If you answer yes here the whole TeX Live installation here,\n",
+          "under ", $localtlpdb->root, ", will be removed!\n");
     print "Remove TeX Live (y/N): ";
     my $yesno = <STDIN>;
     if ($yesno !~ m/^y(es)?$/i) {
@@ -5208,13 +5211,12 @@
     }
   }
   print ("Ok, removing the whole installation:\n");
-  init_local_db();
   TeXLive::TLUtils::remove_symlinks($localtlpdb->root,
     $localtlpdb->platform(),
     $localtlpdb->option("sys_bin"),
     $localtlpdb->option("sys_man"),
     $localtlpdb->option("sys_info"));
-  # now do remove the rest
+  # now remove the rest
   system("rm", "-rf", "$Master/texmf-dist");
   system("rm", "-rf", "$Master/texmf-doc");
   system("rm", "-rf", "$Master/texmf-var");
@@ -5222,8 +5224,9 @@
   system("rm", "-rf", "$Master/bin");
   system("rm", "-rf", "$Master/readme-html.dir");
   system("rm", "-rf", "$Master/readme-txt.dir");
-  for my $f (qw/doc.html index.html LICENSE.CTAN LICENSE.TL README
-                README.usergroups release-texlive.txt texmf.cnf/) {
+  for my $f (qw/doc.html index.html install-tl 
+                LICENSE.CTAN LICENSE.TL README README.usergroups
+                release-texlive.txt texmf.cnf texmfcnf.lua/) {
     system("rm", "-f", "$Master/$f");
   }
   if (-d "$Master/temp") {
@@ -5230,7 +5233,8 @@
     system("rmdir", "--ignore-fail-on-non-empty", "$Master/temp");
   }
   unlink("$Master/install-tl.log");
-  # should we do that????
+  # if they want removal, give them removal. Hopefully they know how to
+  # regenerate any changed config files.
   system("rm", "-rf", "$Master/texmf-config");
   system("rmdir", "--ignore-fail-on-non-empty", "$Master");
 }
@@ -6688,9 +6692,6 @@
 # 2             : not even TLPDB needs to be found
 # if we cannot read tlpdb, die if arg SHOULD_I_DIE is true.
 #
-# if an argument is given and is true init_local_db will die if
-# setting up of programs failed.
-#
 sub init_local_db {
   my ($should_i_die) = @_;
   defined($should_i_die) or ($should_i_die = 0);



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