summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Master/tlpkg/TeXLive/TLPOBJ.pm14
-rwxr-xr-xMaster/tlpkg/bin/tl-update-tlpdb26
2 files changed, 19 insertions, 21 deletions
diff --git a/Master/tlpkg/TeXLive/TLPOBJ.pm b/Master/tlpkg/TeXLive/TLPOBJ.pm
index 34073b391b3..b5eafa69633 100644
--- a/Master/tlpkg/TeXLive/TLPOBJ.pm
+++ b/Master/tlpkg/TeXLive/TLPOBJ.pm
@@ -370,6 +370,7 @@ sub writeout {
}
# writeout all the catalogue keys
foreach my $k (sort keys %{$self->cataloguedata}) {
+ next if $k eq "date";
print $fd "catalogue-$k ", $self->cataloguedata->{$k}, "\n";
}
}
@@ -845,21 +846,10 @@ sub update_from_catalogue {
$tlcname = lc($tlcname);
if (defined($tlc->entries->{$tlcname})) {
my $entry = $tlc->entries->{$tlcname};
- # Record the id of the catalogue entry if it's found due to
- # quest4texlive.
+ # Record the id of the catalogue entry if it's found.
if ($entry->entry->{'id'} ne $tlcname) {
$self->catalogue($entry->entry->{'id'});
}
- if (defined($entry->entry->{'date'})) {
- my $foo = $entry->entry->{'date'};
- $foo =~ s/^.Date: //;
- # trying to extract the interesting part of a subversion date
- # keyword expansion here, e.g.,
- # <dollar>Date: 2007-08-15 19:43:35 +0100 (Wed, 27 Nov 2019) <dollar>
- # ->2007-08-15 19:43:35 +0100
- $foo =~ s/ \(.*\)( *\$ *)$//; # maybe nothing after parens
- $self->cataloguedata->{'date'} = $foo;
- }
if (defined($entry->license)) {
$self->cataloguedata->{'license'} = $entry->license;
}
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>