summaryrefslogtreecommitdiff
path: root/Master/tlpkg/bin/tl-update-tlpdb
diff options
context:
space:
mode:
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>