From ddb7e4fedf257946fe9ff464849ddd8a9c30854c Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Wed, 11 Dec 2019 23:09:43 +0000 Subject: doc,sync git-svn-id: svn://tug.org/texlive/trunk@53100 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/texk/tests/TeXLive/TLConfig.pm | 15 +++++- Build/source/texk/tests/TeXLive/TLUtils.pm | 61 +++++++++++++--------- .../texk/texlive/linked_scripts/texlive/tlmgr.pl | 15 +++--- 3 files changed, 56 insertions(+), 35 deletions(-) (limited to 'Build/source') 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, tlpobj files, ...) relative to the root of the installation; currently C. +=item C<$TeXLive::TLConfig::DatabaseName> + +The name of our so-called database file: C. It's just a +plain text file, not any kind of relational or other database. + +=item C<$TeXLive::TLConfig::DatabaseLocation> + +Concatenation of C "/" C, i.e., +C. + =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 -- utilities used in TeX Live infrastructure +C - 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 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 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 =item C -these two function must be used to get proper JSON C and C -in the output independent of the backend used. +These two crazy functions must be used to get proper JSON C and +C in the output independent of the backend used. =cut @@ -4657,9 +4668,9 @@ __END__ =head1 SEE ALSO -The modules L, L, -L, L, etc., and the -documentation in the repository: C. +The other modules in C (L and +the rest), and the scripts in C (especially +C), the documentation in C, 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) 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 -- cgit v1.2.3