summaryrefslogtreecommitdiff
path: root/Build/source
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-12-11 23:09:43 +0000
committerKarl Berry <karl@freefriends.org>2019-12-11 23:09:43 +0000
commitddb7e4fedf257946fe9ff464849ddd8a9c30854c (patch)
tree47278ccd5ce227649755321ae0026637bdab254e /Build/source
parent78e912c354fd91abbfb6fe9ba6f869449dab2391 (diff)
doc,sync
git-svn-id: svn://tug.org/texlive/trunk@53100 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source')
-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
3 files changed, 56 insertions, 35 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