summaryrefslogtreecommitdiff
path: root/Master/tlpkg/bin/tl-update-tlpdb
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-12-12 23:43:12 +0000
committerKarl Berry <karl@freefriends.org>2019-12-12 23:43:12 +0000
commit056bd3b80423f8a31b7bd2d3b82782831f5fa5eb (patch)
tree827c9399412e1e79870ecbf82d700454085a3631 /Master/tlpkg/bin/tl-update-tlpdb
parent7a9bf2feeb7d7b3a79b7003757fc7484ee980285 (diff)
* TLPOBJ.pm (writeout): do not write catalogue-date.
(update_from_catalogue): do not insert {date} into cataloguedata hash. * tl-update-tlpdb (equal_hashes): ignore differences in catalogue-date. The idea is that we will no longer have catalogue-date in the development tlpdb; updated packages in tlnet will thus have it omitted. We'll remove it entirely from tlnet packages at some point in the future, but no need to rush. This is all because the date value is not meaningful; it's the time of the last commit to the Catalogue subversion repository, which is often entirely unrelated to an update to the package itself. Since we will no longer recreate all packages for each year's release, we have to sync the Catalogue information at other times, so omitting useless updates will be all to the good. git-svn-id: svn://tug.org/texlive/trunk@53112 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/bin/tl-update-tlpdb')
-rwxr-xr-xMaster/tlpkg/bin/tl-update-tlpdb26
1 files changed, 17 insertions, 9 deletions
diff --git a/Master/tlpkg/bin/tl-update-tlpdb b/Master/tlpkg/bin/tl-update-tlpdb
index 90b6498efe1..e118c0e1f96 100755
--- a/Master/tlpkg/bin/tl-update-tlpdb
+++ b/Master/tlpkg/bin/tl-update-tlpdb
@@ -515,8 +515,8 @@ sub tlpdb_catalogue_compare {
next unless defined $tlpA && defined $tlpB;
- # The Master tree isn't relocatable, but for the comparison (tlnet)
- # tree, must swap RELOC marker for actual tree so we can compare.
+ # The Master tree isn't relocatable, so for the comparison (tlnet) tree,
+ # must swap RELOC marker for actual tree so we can compare strings.
$tlpB->replace_reloc_prefix();
if (! &tlpobj_catalogue_equal($tlpA, $tlpB)) {
@@ -589,13 +589,13 @@ sub equal_hashes {
return 1 if !defined $h1 && !defined $h2;
# both must be hash references.
- if (! (&is_hash_ref($h1) && is_hash_ref($h2))) {
+ if (! (&is_hash_ref($h1) && &is_hash_ref($h2))) {
ddebug(" not both hash ref: $h1 vs. $h2\n");
return 0;
}
# must have the same keys (smartmatch operator).
- if (! %$h1 ~~ %$h2) {
+ if (! (%$h1 ~~ %$h2)) {
ddebug(" keys not equal:", join("|", keys %$h1), " vs. ",
join("|", keys %$h2), "\n");
return 0;
@@ -606,12 +606,19 @@ sub equal_hashes {
#
for my $k (keys %$h1) {
#debug(" checking key $k\n");
+
+ # ignore catalogue-date differences. We will eliminate the field
+ # entirely at some point, but there are so many packages that differ
+ # only in catalogue-date, no need to do it all at once.
+ next if $k eq "date";
+
my $aval = $h1->{$k};
my $bval = $h2->{$k};
if (!defined $aval && !defined $bval) {
# ok if both are undefined.
$ret = 1;
+ next;
} else {
# else both have to be defined.
#debug(" for $k, aval=$aval, bval=$bval\n");
@@ -623,11 +630,11 @@ sub equal_hashes {
# if both are hashes compare, else must be not equal.
$ret = &is_hash_ref($bval) ? &equal_hashes($aval, $bval) : 0;
} else {
- # we don't have arrays, non-strings, etc., so don't implement.
+ # we don't have arrays, non-strings, etc., so this is enough.
$ret = &equal_strings($aval, $bval);
}
- last if $ret == 0;
+ last if $ret == 0; # as soon as something is not equal, we're done
}
#debug("equal_hashes returns: $ret\n");
@@ -683,9 +690,10 @@ C<--catalogue=/nonesuch>.
By default, packages for which the only change is in the Catalogue data
are not marked as updated and written with new revisions. This option
-changes that. We enable this for major releases. This implies
-C<--reverse-revision-check>, since the same mechanism is used to force
-the new version numbers.
+changes that (except that the catalogue-date field is ignored). We
+enable this from time to time to re-sync package information. This
+implies C<--reverse-revision-check>, since the same mechanism is used to
+force the new version numbers.
=item B<--fix-reverse-revisions>