diff options
Diffstat (limited to 'Master/tlpkg/TeXLive/TLUtils.pm')
-rw-r--r-- | Master/tlpkg/TeXLive/TLUtils.pm | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/Master/tlpkg/TeXLive/TLUtils.pm b/Master/tlpkg/TeXLive/TLUtils.pm index e7aef738ec0..5e2ef2e565c 100644 --- a/Master/tlpkg/TeXLive/TLUtils.pm +++ b/Master/tlpkg/TeXLive/TLUtils.pm @@ -3948,6 +3948,8 @@ sub download_to_temp_or_file { # $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 ] +# $ret{'catalogue'} = 1 if catalogue data has changed +# but we don't do any semantic check of catalogue data # sub compare_tlpobjs { my ($tlpA, $tlpB) = @_; @@ -3977,6 +3979,31 @@ sub compare_tlpobjs { @add = sort keys %added; $ret{'removed'} = \@rem if @rem; $ret{'added'} = \@add if @add; + # check on difference in catalogue data with respect to keys and values + my $catAname = $tlpA->catalogue; + my $catBname = $tlpB->catalogue; + my $catA = $tlpA->cataloguedata; + my $catB = $tlpB->cataloguedata; + my $catChanges = 0; + if ($catAname ne $catBname) { + $catChanges = 1; + } else { + for my $k (keys %$catA) { + if (!$catB->{$k} || $catA->{$k} ne $catB->{$k}) { + $catChanges = 1; + last; + } + } + if (!$catChanges) { + for my $k (keys %$catB) { + if (!$catA->{$k} || $catA->{$k} ne $catB->{$k}) { + $catChanges = 1; + last; + } + } + } + } + $ret{'catalogue'} = $catChanges; return %ret; } |