texlive[53100] trunk: doc,sync

commits+karl at tug.org commits+karl at tug.org
Thu Dec 12 00:09:44 CET 2019


Revision: 53100
          http://tug.org/svn/texlive?view=revision&revision=53100
Author:   karl
Date:     2019-12-12 00:09:43 +0100 (Thu, 12 Dec 2019)
Log Message:
-----------
doc,sync

Modified Paths:
--------------
    trunk/Build/source/texk/tests/TeXLive/TLConfig.pm
    trunk/Build/source/texk/tests/TeXLive/TLUtils.pm
    trunk/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl
    trunk/Master/texmf-dist/scripts/texlive/NEWS
    trunk/Master/tlpkg/bin/tl-update-containers

Added Paths:
-----------
    trunk/Master/tlpkg/bin/archive/tl-dump-texcatalogue

Modified: trunk/Build/source/texk/tests/TeXLive/TLConfig.pm
===================================================================
--- trunk/Build/source/texk/tests/TeXLive/TLConfig.pm	2019-12-11 21:54:44 UTC (rev 53099)
+++ trunk/Build/source/texk/tests/TeXLive/TLConfig.pm	2019-12-11 23:09:43 UTC (rev 53100)
@@ -5,7 +5,7 @@
 
 package TeXLive::TLConfig;
 
-my $svnrev = '$Revision: 52745 $';
+my $svnrev = '$Revision: 53076 $';
 my $_modulerevision = ($svnrev =~ m/: ([0-9]+) /) ? $1 : "unknown";
 sub module_revision { return $_modulerevision; }
 
@@ -29,6 +29,7 @@
     %Compressors
     $InfraLocation
     $DatabaseName
+    $DatabaseLocation
     $PackageBackupDir 
     $BlockSize
     $Archive
@@ -81,10 +82,12 @@
 # relative to a root (e.g., the Master/, or the installation path)
 our $InfraLocation = "tlpkg";
 our $DatabaseName = "texlive.tlpdb";
+our $DatabaseLocation = "$InfraLocation/$DatabaseName";
 
 # location of backups in default autobackup setting (under tlpkg)
 our $PackageBackupDir = "$InfraLocation/backups";
 
+# for computing disk usage; this is most common.
 our $BlockSize = 4096;
 
 # timeout for network connections (wget, LWP) in seconds
@@ -311,6 +314,16 @@
 tlpobj files, ...) relative to the root of the installation; currently
 C<tlpkg>.
 
+=item C<$TeXLive::TLConfig::DatabaseName>
+
+The name of our so-called database file: C<texlive.tlpdb>. It's just a
+plain text file, not any kind of relational or other database.
+
+=item C<$TeXLive::TLConfig::DatabaseLocation>
+
+Concatenation of C<InfraLocation> "/" C<DatabaseName>, i.e.,
+C<tlpkg/texlive.tlpdb>.
+
 =item C<$TeXLive::TLConfig::BlockSize>
 
 The assumed block size, currently 4k.

Modified: trunk/Build/source/texk/tests/TeXLive/TLUtils.pm
===================================================================
--- trunk/Build/source/texk/tests/TeXLive/TLUtils.pm	2019-12-11 21:54:44 UTC (rev 53099)
+++ trunk/Build/source/texk/tests/TeXLive/TLUtils.pm	2019-12-11 23:09:43 UTC (rev 53100)
@@ -5,7 +5,7 @@
 
 package TeXLive::TLUtils;
 
-my $svnrev = '$Revision: 52815 $';
+my $svnrev = '$Revision: 53076 $';
 my $_modulerevision = ($svnrev =~ m/: ([0-9]+) /) ? $1 : "unknown";
 sub module_revision { return $_modulerevision; }
 
@@ -13,7 +13,7 @@
 
 =head1 NAME
 
-C<TeXLive::TLUtils> -- utilities used in TeX Live infrastructure
+C<TeXLive::TLUtils> - utilities used in TeX Live infrastructure
 
 =head1 SYNOPSIS
 
@@ -2182,7 +2182,7 @@
     if ($tlchecksum ne $checksum) {
       tlwarn("TLUtils::check_file: checksums differ for $xzfile:\n");
       tlwarn("TLUtils::check_file:   tlchecksum=$tlchecksum, arg=$checksum\n");
-      (undef,$check_file_tmpdir) = File::Temp::tempdir("tlcheckfileXXXXXXXX");
+      $check_file_tmpdir = File::Temp::tempdir("tlcheckfileXXXXXXXX");
       tlwarn("TLUtils::check_file:   removing $xzfile, "
              . "but saving copy in $check_file_tmpdir\n");
       copy($xzfile, $check_file_tmpdir);
@@ -3476,6 +3476,7 @@
   my @items = ();
   for my $key (sort keys %hash) {
     my $val = $hash{$key};
+    $val = ".undef" if ! defined $val;
     $key =~ s/\n/\\n/g;
     $val =~ s/\n/\\n/g;
     push (@items, "$key:$val");
@@ -4037,17 +4038,20 @@
   return;
 }
 
-# compare_tlpobjs 
-# returns a hash
-#   $ret{'revision'} = "leftRev:rightRev"     if revision differ
-#   $ret{'removed'} = \[ list of files removed from A to B ]
-#   $ret{'added'} = \[ list of files added from A to B ]
-#
+

+=item C<< compare_tlpobjs($tlpA, $tlpB) >>
+
+Compare the two passed L<TLPOBJ> objects.  Returns a hash:
+
+  $ret{'revision'}  = "revA:revB" # if revisions differ
+  $ret{'removed'}   = \[ list of files removed from A to B ]
+  $ret{'added'}     = \[ list of files added from A to B ]
+
+=cut
+
 sub compare_tlpobjs {
   my ($tlpA, $tlpB) = @_;
   my %ret;
-  my @rem;
-  my @add;
 
   my $rA = $tlpA->revision;
   my $rB = $tlpB->revision;
@@ -4067,20 +4071,27 @@
   for my $f (@fA) { $removed{$f} = 1; }
   for my $f (@fB) { delete($removed{$f}); $added{$f} = 1; }
   for my $f (@fA) { delete($added{$f}); }
-  @rem = sort keys %removed;
-  @add = sort keys %added;
+  my @rem = sort keys %removed;
+  my @add = sort keys %added;
   $ret{'removed'} = \@rem if @rem;
   $ret{'added'} = \@add if @add;
+
   return %ret;
 }
 
-#
-# compare_tlpdbs
-# return several hashes
-# @{$ret{'removed_packages'}} = list of removed packages from A to B
-# @{$ret{'added_packages'}} = list of added packages from A to B
-# $ret{'different_packages'}->{$package} = output of compare_tlpobjs
-#
+

+=item C<< compare_tlpdbs($tlpdbA, $tlpdbB, @more_ignored_pkgs) >>
+
+Compare the two passed L<TLPDB> objects, ignoring the packages
+C<00texlive.installer>, C<00texlive.image>, and any passed
+C<@more_ignore_pkgs>. Returns a hash:
+
+  $ret{'removed_packages'} = \[ list of removed packages from A to B ]
+  $ret{'added_packages'}   = \[ list of added packages from A to B ]
+  $ret{'different_packages'}->{$package} = output of compare_tlpobjs
+
+=cut
+
 sub compare_tlpdbs {
   my ($tlpdbA, $tlpdbB, @add_ignored_packs) = @_;
   my @ignored_packs = qw/00texlive.installer 00texlive.image/;
@@ -4501,8 +4512,8 @@
 =item C<True()>
 =item C<False()>
 
-these two function must be used to get proper JSON C<true> and C<false> 
-in the output independent of the backend used.
+These two crazy functions must be used to get proper JSON C<true> and
+C<false> in the output independent of the backend used.
 
 =cut
 
@@ -4657,9 +4668,9 @@
 
 =head1 SEE ALSO
 
-The modules L<TeXLive::TLConfig>, L<TeXLive::TLCrypto>,
-L<TeXLive::TLDownload>, L<TeXLive::TLWinGoo>, etc., and the
-documentation in the repository: C<Master/tlpkg/doc/>.
+The other modules in C<Master/tlpkg/TeXLive/> (L<TeXLive::TLConfig> and
+the rest), and the scripts in C<Master/tlpg/bin/> (especially
+C<tl-update-tlpdb>), the documentation in C<Master/tlpkg/doc/>, etc.
 
 =head1 AUTHORS AND COPYRIGHT
 

Modified: trunk/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl
===================================================================
--- trunk/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl	2019-12-11 21:54:44 UTC (rev 53099)
+++ trunk/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl	2019-12-11 23:09:43 UTC (rev 53100)
@@ -1,12 +1,12 @@
 #!/usr/bin/env perl
-# $Id: tlmgr.pl 52931 2019-11-26 23:04:18Z karl $
+# $Id: tlmgr.pl 53076 2019-12-10 06:20:44Z preining $
 #
 # Copyright 2008-2019 Norbert Preining
 # This file is licensed under the GNU General Public License version 2
 # or any later version.
 
-my $svnrev = '$Revision: 52931 $';
-my $datrev = '$Date: 2019-11-27 00:04:18 +0100 (Wed, 27 Nov 2019) $';
+my $svnrev = '$Revision: 53076 $';
+my $datrev = '$Date: 2019-12-10 07:20:44 +0100 (Tue, 10 Dec 2019) $';
 my $tlmgrrevision;
 my $tlmgrversion;
 my $prg;
@@ -1096,7 +1096,6 @@
   if ($opts{"backup"}) {
     $tlp->make_container($::progs{'compressor'}, $localtlpdb->root,
                          destdir => $opts{"backupdir"}, 
-                         containername => "${pkg}.r" . $tlp->revision,
                          relative => $tlp->relocated,
                          user => 1);
     if ($autobackup) {
@@ -2168,7 +2167,6 @@
       if (!$opts{"dry-run"}) {
         $tlp->make_container($::progs{'compressor'}, $localtlpdb->root,
                              destdir => $opts{"backupdir"},
-                             containername => "${pkg}.r" . $tlp->revision,
                              user => 1);
       }
     }
@@ -2288,7 +2286,7 @@
     #   some-name.r[0-9]+
     my ($size, undef, $fullname) = $localtlp->make_container("tar", $root,
                                      destdir => $temp,
-                                     containername => "__BACKUP_$pkg.r$oldrev",
+                                     containername => "__BACKUP_$pkg",
                                      user => 1);
     if ($size <= 0) {
       tlwarn("$prg: creation of backup container failed for: $pkg\n");
@@ -3210,7 +3208,6 @@
         my $compressorextension = $Compressors{$::progs{'compressor'}}{'extension'};
         $tlp->make_container($::progs{'compressor'}, $root,
                              destdir => $opts{"backupdir"},
-                             containername => "${pkg}.r" . $tlp->revision,
                              relative => $tlp->relocated,
                              user => 1);
         $unwind_package =
@@ -3252,7 +3249,7 @@
         my $tlp = $localtlpdb->get_package($pkg);
         my ($s, undef, $fullname) = $tlp->make_container("tar", $root,
                          destdir => $temp,
-                         containername => "__BACKUP_${pkg}.r" . $tlp->revision,
+                         containername => "__BACKUP_${pkg}",
                          relative => $tlp->relocated,
                          user => 1);
         if ($s <= 0) {
@@ -9963,7 +9960,7 @@
 distribution (L<https://tug.org/texlive>) and both are licensed under the
 GNU General Public License Version 2 or later.
 
-$Id: tlmgr.pl 52931 2019-11-26 23:04:18Z karl $
+$Id: tlmgr.pl 53076 2019-12-10 06:20:44Z preining $
 =cut
 
 # test HTML version: pod2html --cachedir=/tmp tlmgr.pl >/tmp/tlmgr.html

Modified: trunk/Master/texmf-dist/scripts/texlive/NEWS
===================================================================
--- trunk/Master/texmf-dist/scripts/texlive/NEWS	2019-12-11 21:54:44 UTC (rev 53099)
+++ trunk/Master/texmf-dist/scripts/texlive/NEWS	2019-12-11 23:09:43 UTC (rev 53100)
@@ -1,6 +1,11 @@
 (This file public domain.  Originally written by Norbert Preining and
 Karl Berry, 2010.)
 
+<p><b>tlmgr 52931 (released 27nov19):</b>
+<li>major change to <a
+href="https://tug.org/texlive/tlmgr.html#verpkg">versioned package
+containers</a> for the central tlnet repository.
+
 <p><b>tlmgr 52752 (released 12nov19):</b>
 <li>TLConfig.pm: luahbtex binary missing on some platforms until TL'20.
 

Added: trunk/Master/tlpkg/bin/archive/tl-dump-texcatalogue
===================================================================
--- trunk/Master/tlpkg/bin/archive/tl-dump-texcatalogue	                        (rev 0)
+++ trunk/Master/tlpkg/bin/archive/tl-dump-texcatalogue	2019-12-11 23:09:43 UTC (rev 53100)
@@ -0,0 +1,37 @@
+#!/usr/bin/env perl
+# $Id: tl-dump-texcatalogue 26533 2012-05-21 04:22:56Z preining $
+# Copyright 2012 Norbert Preining
+# This file is licensed under the GNU General Public License version 2
+# or any later version.
+#
+# Write a parsable representation of the catalogue to stdout
+# run from cron.tl
+
+BEGIN {
+  $^W = 1;
+  chomp ($mydir = `dirname $0`);
+  unshift (@INC, "$mydir/..");
+}
+
+use strict;
+$^W = 1;
+use Data::Dumper;
+use TeXLive::TeXCatalogue;
+
+exit (&main ());
+
+sub main {
+  if (@ARGV != 1) {
+    die "Usage: $0 /PATH/TO/CATALOGUE\n";
+  }
+
+  my $texcatalogue = TeXLive::TeXCatalogue->new(location => $ARGV[0]);
+
+  $Data::Dumper::Indent = 1;
+  $Data::Dumper::Sortkeys = 1;  # stable output
+  $Data::Dumper::Purity = 1; # recursive structures must be safe
+  print Data::Dumper->Dump([\$texcatalogue], [qw(tlc)]);
+  
+  return 0;
+}
+


Property changes on: trunk/Master/tlpkg/bin/archive/tl-dump-texcatalogue
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Modified: trunk/Master/tlpkg/bin/tl-update-containers
===================================================================
--- trunk/Master/tlpkg/bin/tl-update-containers	2019-12-11 21:54:44 UTC (rev 53099)
+++ trunk/Master/tlpkg/bin/tl-update-containers	2019-12-11 23:09:43 UTC (rev 53100)
@@ -562,7 +562,7 @@
 C<texlive.tlpdb> if need be.
 
 We used to recreate all containers for the release each year. Starting
-with TL20, we longer do this, since it causes files with the same name
+with TL20, we no longer do this, since it causes files with the same name
 (foo.tar.xz) to change contents, either just compression options, etc.,
 or because the Catalogue values changed. We did not normally push out
 Catalogue-only changes to tlnet during the year since they frequently



More information about the tex-live-commits mailing list