summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Build/source/texk/tests/TeXLive/TLConfig.pm15
-rw-r--r--Build/source/texk/tests/TeXLive/TLUtils.pm61
-rwxr-xr-xBuild/source/texk/texlive/linked_scripts/texlive/tlmgr.pl15
-rw-r--r--Master/texmf-dist/scripts/texlive/NEWS5
-rwxr-xr-xMaster/tlpkg/bin/archive/tl-dump-texcatalogue37
-rwxr-xr-xMaster/tlpkg/bin/tl-update-containers2
6 files changed, 99 insertions, 36 deletions
diff --git a/Build/source/texk/tests/TeXLive/TLConfig.pm b/Build/source/texk/tests/TeXLive/TLConfig.pm
index 8e3117a6b72..86552e6004f 100644
--- a/Build/source/texk/tests/TeXLive/TLConfig.pm
+++ b/Build/source/texk/tests/TeXLive/TLConfig.pm
@@ -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 @@ BEGIN {
%Compressors
$InfraLocation
$DatabaseName
+ $DatabaseLocation
$PackageBackupDir
$BlockSize
$Archive
@@ -81,10 +82,12 @@ our $DefaultCategory = "Package";
# 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 @@ The subdirectory with various infrastructure files (C<texlive.tlpdb>,
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.
diff --git a/Build/source/texk/tests/TeXLive/TLUtils.pm b/Build/source/texk/tests/TeXLive/TLUtils.pm
index 327749e8944..33863f6869f 100644
--- a/Build/source/texk/tests/TeXLive/TLUtils.pm
+++ b/Build/source/texk/tests/TeXLive/TLUtils.pm
@@ -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 @@ sub module_revision { return $_modulerevision; }
=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 @@ sub check_file_and_remove {
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 @@ sub debug_hash {
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 @@ sub download_to_temp_or_file {
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 @@ sub compare_tlpobjs {
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 @@ our $jsonmode = "";
=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 @@ __END__
=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
diff --git a/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl b/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl
index 9d5e8be2cb1..d2578410c46 100755
--- a/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl
+++ b/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl
@@ -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 @@ sub backup_and_remove_package {
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 @@ sub action_backup {
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 @@ sub write_w32_updater {
# 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 @@ sub action_update {
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 @@ sub action_update {
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 @@ This script and its documentation were written for the TeX Live
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
diff --git a/Master/texmf-dist/scripts/texlive/NEWS b/Master/texmf-dist/scripts/texlive/NEWS
index 46aa3c4a4fe..4d53d80b9cb 100644
--- a/Master/texmf-dist/scripts/texlive/NEWS
+++ b/Master/texmf-dist/scripts/texlive/NEWS
@@ -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.
diff --git a/Master/tlpkg/bin/archive/tl-dump-texcatalogue b/Master/tlpkg/bin/archive/tl-dump-texcatalogue
new file mode 100755
index 00000000000..87689c780fe
--- /dev/null
+++ b/Master/tlpkg/bin/archive/tl-dump-texcatalogue
@@ -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;
+}
+
diff --git a/Master/tlpkg/bin/tl-update-containers b/Master/tlpkg/bin/tl-update-containers
index dee164e32fb..1c50b03cc95 100755
--- a/Master/tlpkg/bin/tl-update-containers
+++ b/Master/tlpkg/bin/tl-update-containers
@@ -562,7 +562,7 @@ Forces rebuild of all containers, including creation of the output
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