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

commits+karl at tug.org commits+karl at tug.org
Wed Feb 10 23:57:29 CET 2021


Revision: 57705
          http://tug.org/svn/texlive?view=revision&revision=57705
Author:   karl
Date:     2021-02-10 23:57:28 +0100 (Wed, 10 Feb 2021)
Log Message:
-----------
(uninstall_texlive): use File::Find::finddepth
instead of GNU rmdir --ignore-fail-on-non-empty.
Report from David Stes.

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-02-10 22:18:43 UTC (rev 57704)
+++ trunk/Master/texmf-dist/scripts/texlive/tlmgr.pl	2021-02-10 22:57:28 UTC (rev 57705)
@@ -93,6 +93,7 @@
 }
 
 use Cwd qw/abs_path/;
+use File::Find;
 use File::Spec;
 use Pod::Usage;
 use Getopt::Long qw(:config no_autoabbrev permute);
@@ -5239,7 +5240,8 @@
 
 
 # 
 UNINSTALL
-#
+# Return zero if successful, nonzero if failure.
+# 
 sub uninstall_texlive {
   if (win32()) {
     printf STDERR "Please use \"Add/Remove Programs\" from the Control Panel to removing TeX Live!\n";
@@ -5279,13 +5281,15 @@
     system("rm", "-f", "$Master/$f");
   }
   if (-d "$Master/temp") {
-    system("rmdir", "--ignore-fail-on-non-empty", "$Master/temp");
+    finddepth(sub { rmdir; }, "$Master/temp");
   }
   unlink("$Master/install-tl.log");
   # 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");
+  finddepth(sub { rmdir; }, "$Master");
+  
+  return -d "$Master";
 }
 
 



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