summaryrefslogtreecommitdiff
path: root/systems/texlive/tlnet/tlpkg/TeXLive
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2020-10-07 03:00:49 +0000
committerNorbert Preining <norbert@preining.info>2020-10-07 03:00:49 +0000
commit6a2f87148a137f5014278229a8175b7babf238cf (patch)
tree9dcfc63f084f80d07d68442a837f468630f71b98 /systems/texlive/tlnet/tlpkg/TeXLive
parent2884d8fdd76b2def1d759c76c03141710c219ad7 (diff)
CTAN sync 202010070300
Diffstat (limited to 'systems/texlive/tlnet/tlpkg/TeXLive')
-rw-r--r--systems/texlive/tlnet/tlpkg/TeXLive/TLUtils.pm50
1 files changed, 48 insertions, 2 deletions
diff --git a/systems/texlive/tlnet/tlpkg/TeXLive/TLUtils.pm b/systems/texlive/tlnet/tlpkg/TeXLive/TLUtils.pm
index b66774755b..80a5493059 100644
--- a/systems/texlive/tlnet/tlpkg/TeXLive/TLUtils.pm
+++ b/systems/texlive/tlnet/tlpkg/TeXLive/TLUtils.pm
@@ -1,4 +1,4 @@
-# $Id: TLUtils.pm 55776 2020-07-07 22:32:40Z karl $
+# $Id: TLUtils.pm 56565 2020-10-06 00:40:39Z preining $
# TeXLive::TLUtils.pm - the inevitable utilities for TeX Live.
# Copyright 2007-2020 Norbert Preining, Reinhard Kotucha
# This file is licensed under the GNU General Public License version 2
@@ -6,7 +6,7 @@
package TeXLive::TLUtils;
-my $svnrev = '$Revision: 55776 $';
+my $svnrev = '$Revision: 56565 $';
my $_modulerevision = ($svnrev =~ m/: ([0-9]+) /) ? $1 : "unknown";
sub module_revision { return $_modulerevision; }
@@ -4170,6 +4170,7 @@ 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 ]
+ $ret{'fmttriggers'} = 1 if the fmttriggers have changed
=cut
@@ -4200,6 +4201,51 @@ sub compare_tlpobjs {
$ret{'removed'} = \@rem if @rem;
$ret{'added'} = \@add if @add;
+ # changed dependencies should not trigger a change without a
+ # change in revision, so for now (until we find a reason why
+ # we need to) we don't check.
+ # OTOH, execute statements like
+ # execute AddFormat name=aleph engine=aleph options=*aleph.ini fmttriggers=cm,hyphen-base,knuth-lib,plain
+ # might change due to changes in the fmttriggers variables.
+ # Again, name/engine/options are only defined in the package's
+ # tlpsrc file, so changes here will trigger revision changes,
+ # but fmttriggers are defined outside the tlpsrc and thus do
+ # not trigger an automatic revision change. Check for that!
+ # No need to record actual changes, just record that it has changed.
+ my %triggersA;
+ my %triggersB;
+ # we sort executes after format/engine like fmtutil does, since this
+ # should be unique
+ for my $e ($tlpA->executes) {
+ if ($e =~ m/AddFormat\s+(.*)\s*/) {
+ my %r = parse_AddFormat_line("$1");
+ if (defined($r{"error"})) {
+ die "$r{'error'} when comparing packages $tlpA->name execute $e";
+ }
+ for my $t (@{$r{'fmttriggers'}}) {
+ $triggersA{"$r{'name'}:$r{'engine'}:$t"} = 1;
+ }
+ }
+ }
+ for my $e ($tlpB->executes) {
+ if ($e =~ m/AddFormat\s+(.*)\s*/) {
+ my %r = parse_AddFormat_line("$1");
+ if (defined($r{"error"})) {
+ die "$r{'error'} when comparing packages $tlpB->name execute $e";
+ }
+ for my $t (@{$r{'fmttriggers'}}) {
+ $triggersB{"$r{'name'}:$r{'engine'}:$t"} = 1;
+ }
+ }
+ }
+ for my $t (keys %triggersA) {
+ delete($triggersA{$t});
+ delete($triggersB{$t});
+ }
+ if (keys(%triggersA) || keys(%triggersB)) {
+ $ret{'fmttrigger'} = 1;
+ }
+
return %ret;
}