texlive[52932]

commits+karl at tug.org commits+karl at tug.org
Wed Nov 27 00:05:13 CET 2019


Revision: 52932
          http://tug.org/svn/texlive?view=revision&revision=52932
Author:   karl
Date:     2019-11-27 00:05:13 +0100 (Wed, 27 Nov 2019)
Log Message:
-----------
TLPOBJ.pm (make_container): write versioned containers, i.e., include
the revision number in the .tar.xz container filename. Symlink the
unversioned name. Also take named arguments (as a hash).

tlmgr.pl (backup_and_remove_package, action_backup, write_w32_updater,
action_update): change calls to make_container to include package
revision and use named arguments. [sync in linked_scripts]

tl-update-containers: change make_container calls.
(rcheck_container): new fn to remove containers with older revision
numbers; call from main if all else succeeds.

Modified Paths:
--------------
    trunk/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl

Modified: trunk/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl
===================================================================
--- trunk/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl	2019-11-26 23:04:18 UTC (rev 52931)
+++ trunk/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl	2019-11-26 23:05:13 UTC (rev 52932)
@@ -1,12 +1,12 @@
 #!/usr/bin/env perl
-# $Id: tlmgr.pl 52848 2019-11-17 22:43:11Z karl $
+# $Id: tlmgr.pl 52931 2019-11-26 23:04:18Z karl $
 #
 # Copyright 2008-2019 Norbert Preining
 # This file is licensed under the GNU General Public License version 2
 # or any later version.
 
-my $svnrev = '$Revision: 52848 $';
-my $datrev = '$Date: 2019-11-17 23:43:11 +0100 (Sun, 17 Nov 2019) $';
+my $svnrev = '$Revision: 52931 $';
+my $datrev = '$Date: 2019-11-27 00:04:18 +0100 (Wed, 27 Nov 2019) $';
 my $tlmgrrevision;
 my $tlmgrversion;
 my $prg;
@@ -1095,9 +1095,10 @@
   }
   if ($opts{"backup"}) {
     $tlp->make_container($::progs{'compressor'}, $localtlpdb->root,
-                         $opts{"backupdir"}, 
-                         "${pkg}.r" . $tlp->revision,
-                         $tlp->relocated);
+                         destdir => $opts{"backupdir"}, 
+                         containername => "${pkg}.r" . $tlp->revision,
+                         relative => $tlp->relocated,
+                         user => 1);
     if ($autobackup) {
       # in case we do auto backups we remove older backups
       clear_old_backups($pkg, $opts{"backupdir"}, $autobackup);
@@ -2166,7 +2167,9 @@
            . $tlp->revision . ".tar.$compressorextension\n");
       if (!$opts{"dry-run"}) {
         $tlp->make_container($::progs{'compressor'}, $localtlpdb->root,
-                             $opts{"backupdir"}, "${pkg}.r" . $tlp->revision);
+                             destdir => $opts{"backupdir"},
+                             containername => "${pkg}.r" . $tlp->revision,
+                             user => 1);
       }
     }
   }
@@ -2281,8 +2284,12 @@
     push (@rst_tlpobj, "tlpkg\\tlpobj\\$pkg.tlpobj");
     push (@rst_info, "$pkg ^($oldrev^)");
     next if ($opts{"dry-run"});
-    # create backup; make_container expects file name in a format: some-name.r[0-9]+
-    my ($size, undef, $fullname) = $localtlp->make_container("tar", $root, $temp, "__BACKUP_$pkg.r$oldrev");
+    # create backup; make_container expects filename in format:
+    #   some-name.r[0-9]+
+    my ($size, undef, $fullname) = $localtlp->make_container("tar", $root,
+                                     destdir => $temp,
+                                     containername => "__BACKUP_$pkg.r$oldrev",
+                                     user => 1);
     if ($size <= 0) {
       tlwarn("$prg: creation of backup container failed for: $pkg\n");
       return 1; # backup failed? abort
@@ -3202,8 +3209,10 @@
       if ($opts{"backup"} && !$opts{"dry-run"}) {
         my $compressorextension = $Compressors{$::progs{'compressor'}}{'extension'};
         $tlp->make_container($::progs{'compressor'}, $root,
-                             $opts{"backupdir"}, "${pkg}.r" . $tlp->revision,
-                             $tlp->relocated);
+                             destdir => $opts{"backupdir"},
+                             containername => "${pkg}.r" . $tlp->revision,
+                             relative => $tlp->relocated,
+                             user => 1);
         $unwind_package =
             "$opts{'backupdir'}/${pkg}.r" . $tlp->revision . ".tar.$compressorextension";
         
@@ -3241,9 +3250,11 @@
         # no backup was made, so let us create a temporary .tar file
         # of the package
         my $tlp = $localtlpdb->get_package($pkg);
-        my ($s, undef, $fullname) = $tlp->make_container("tar", $root, $temp,
-                                      "__BACKUP_${pkg}.r" . $tlp->revision,
-                                      $tlp->relocated);
+        my ($s, undef, $fullname) = $tlp->make_container("tar", $root,
+                         destdir => $temp,
+                         containername => "__BACKUP_${pkg}.r" . $tlp->revision,
+                         relative => $tlp->relocated,
+                         user => 1);
         if ($s <= 0) {
           tlwarn("\n$prg: creation of backup container failed for: $pkg\n");
           tlwarn("$prg: continuing to update other packages, please retry...\n");
@@ -9952,7 +9963,7 @@
 distribution (L<https://tug.org/texlive>) and both are licensed under the
 GNU General Public License Version 2 or later.
 
-$Id: tlmgr.pl 52848 2019-11-17 22:43:11Z karl $
+$Id: tlmgr.pl 52931 2019-11-26 23:04:18Z karl $
 =cut
 
 # test HTML version: pod2html --cachedir=/tmp tlmgr.pl >/tmp/tlmgr.html



More information about the tex-live-commits mailing list