summaryrefslogtreecommitdiff
path: root/Master/tlpkg/TeXLive/TLUtils.pm
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-12-05 19:15:11 +0000
committerKarl Berry <karl@freefriends.org>2019-12-05 19:15:11 +0000
commit8b5fd6387b9d1e730b07f360637812d8ecdbb253 (patch)
tree8034908216a5d7df083a48bc82b1951c2494f99b /Master/tlpkg/TeXLive/TLUtils.pm
parent3c343eb00f6ef34f834a4d05eee540a4433968a3 (diff)
doc
git-svn-id: svn://tug.org/texlive/trunk@53032 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/TeXLive/TLUtils.pm')
-rw-r--r--Master/tlpkg/TeXLive/TLUtils.pm53
1 files changed, 32 insertions, 21 deletions
diff --git a/Master/tlpkg/TeXLive/TLUtils.pm b/Master/tlpkg/TeXLive/TLUtils.pm
index 161259d4112..f2a5b1ce093 100644
--- a/Master/tlpkg/TeXLive/TLUtils.pm
+++ b/Master/tlpkg/TeXLive/TLUtils.pm
@@ -14,7 +14,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
@@ -3477,6 +3477,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");
@@ -4038,17 +4039,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;
@@ -4068,20 +4072,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/;
@@ -4658,9 +4669,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