summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2016-06-13 20:45:11 +0000
committerKarl Berry <karl@freefriends.org>2016-06-13 20:45:11 +0000
commit4c015cef69dbc996e766a3113004f24c700c166d (patch)
treec0f8751632e2525ccb21913a65bb6f829038fd97 /Master
parentcb42f7dd530ef6ee8b5f84819df7c730a7a99caa (diff)
fmttrigger updates
git-svn-id: svn://tug.org/texlive/trunk@41438 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rwxr-xr-xMaster/tlpkg/bin/check-fmttriggers79
-rw-r--r--Master/tlpkg/tlpsrc/latex-bin.tlpsrc4
-rw-r--r--Master/tlpkg/tlpsrc/lollipop.tlpsrc2
-rw-r--r--Master/tlpkg/tlpsrc/platex.tlpsrc4
-rw-r--r--Master/tlpkg/tlpsrc/ptex.tlpsrc6
-rw-r--r--Master/tlpkg/tlpsrc/uptex.tlpsrc6
-rw-r--r--Master/tlpkg/tlpsrc/xetex.tlpsrc4
7 files changed, 55 insertions, 50 deletions
diff --git a/Master/tlpkg/bin/check-fmttriggers b/Master/tlpkg/bin/check-fmttriggers
index 60cbca9d533..a696789d07d 100755
--- a/Master/tlpkg/bin/check-fmttriggers
+++ b/Master/tlpkg/bin/check-fmttriggers
@@ -64,13 +64,14 @@ sub main {
# read tlpdb.
my $tlpdb_file = "$Master/tlpkg/texlive.tlpdb";
- my ($tlpdb,$fmttriggers) = &tlpdb_by_file ($tlpdb_file);
+ my ($tlpdb,$fmttriggers,$fmtpkgcontainers) = &tlpdb_by_file ($tlpdb_file);
- # map files used in format building to packages.
+ # map files used in the format builds to packages.
my %pkgs_per_format = &pkgs_per_format ($tlpdb, %files_per_format);
# check that those packages are exactly what's listed as needed.
- return &compare_pkgs_and_triggers (\%pkgs_per_format, $fmttriggers);
+ return &compare_pkgs_and_triggers (\%pkgs_per_format,
+ $fmttriggers, $fmtpkgcontainers);
}
@@ -157,10 +158,10 @@ sub files_per_format {
my $ef = "$engine.$format";
# Unfortunately, format filenames themselves are not unique, due to
- # cont-en and pdfcsplain. Shouldn't be any engine-format dups, though.
+ # cont-en and pdfcsplain. Shouldn't be any engine+format dups, though.
#
- tldie ("$prg: already saw format $ef\n (with files @{$ret{$ef}})\n"
- . " files now = @files\n")
+ tldie ("$prg: already saw format $ef\n (with files @{$ret{$ef}}),\n"
+ . " files now = @files\n")
if exists $ret{$ef};
$ret{$ef} = \@files;
}
@@ -170,9 +171,10 @@ sub files_per_format {
}
-# Read TLPDB_FILE and return references to two hashes: one mapping
-# contained files to TL package names, and a second mapping
-# engine.format names to their specified fmttriggers.
+# Read TLPDB_FILE and return references to three hashes:
+# the first mapping contained files to TL package names,
+# the second mapping engine.format names to their specified fmttriggers,
+# and the third mapping engine.format names to the package defining them.
#
# Instead of using the general TeXLive::TLPDB functions, read the tlpdb
# file ourselves. We want to build the file->package mapping just once,
@@ -182,7 +184,7 @@ sub files_per_format {
#
sub tlpdb_by_file {
my ($tlpdb_file) = @_;
- my (%tlpfiles, %fmttriggers);
+ my (%tlpfiles, %fmttriggers, %fmtpkgcontainers);
open (my $tlpdb, $tlpdb_file) || die "open($tlpdb_file) failed: $!";
my $pkg;
@@ -198,7 +200,14 @@ sub tlpdb_by_file {
. "line = $_\n");
}
if ($af{"fmttriggers"}) {
- $fmttriggers{"$af{engine}.$af{name}"} = $af{"fmttriggers"};
+ my $ef = "$af{engine}.$af{name}";
+ if (exists ($fmttriggers{$ef})) {
+ tldie ("$prg: already saw triggers for $ef ($fmttriggers{$ef}),"
+ . " triggers now = $af{fmttriggers}\n");
+ }
+ $fmttriggers{$ef} = $af{"fmttriggers"};
+ $fmtpkgcontainers{$ef} = $pkg;
+ #warn " fmtpkgcontainers{$ef} = $pkg\n";
} else {
tlwarn ("$prg: no fmttriggers: $_\n");
}
@@ -209,8 +218,8 @@ sub tlpdb_by_file {
# The installer "package" isn't one, just ignore it.
next if $pkg eq "00texlive.installer";
my $f = $_;
- tldie ("$prg: already saw file $f (package $tlpfiles{$f}), "
- . "now in package $pkg\n")
+ tlwarn ("$prg: already saw file $f (package $tlpfiles{$f}),"
+ . " now in package $pkg\n")
if exists $tlpfiles{$f}; # should never happen
$tlpfiles{$f} = $pkg;
}
@@ -219,7 +228,7 @@ sub tlpdb_by_file {
&info ("TLPDB files: " . scalar (keys %tlpfiles)
. " triggers: " . scalar (keys %fmttriggers) . "\n");
- return (\%tlpfiles, \%fmttriggers);
+ return (\%tlpfiles, \%fmttriggers, \%fmtpkgcontainers);
}
@@ -231,14 +240,6 @@ sub pkgs_per_format {
my ($tlpdb,%files_per_format) = @_;
my %ret; # format->pkgs mapping
- # we don't include these as fmttriggers since when they meaningfully
- # change, fmtutil should get called anyway due to language.* changing.
- my @skip_pkgs = qw(dehyph-exptl hyph-utf8 hyphen-ancientgreek hyphen-german
- hyphen-greek ruhyphen ukrhyph);
- # there's also the question of the binaries themselves. we just
- # ignore that, since it hasn't been a problem in practice: when the
- # binaries change, everything tends to change anyway.
-
for my $format (sort keys %files_per_format) {
&debug ("finding packages for $format...\n");
my %pkgs_for_this_format;
@@ -246,13 +247,12 @@ sub pkgs_per_format {
for my $f (@$files_ref) {
if (exists $tlpdb->{$f}) {
my $pkg = $tlpdb->{$f};
- next if grep ($_ eq $pkg, @skip_pkgs);
$pkgs_for_this_format{$pkg} = 1;
} else {
tlwarn ("$prg: tl package not found for file: $f\n");
}
}
- #
+
# looked up all files for this format; save our list of packages.
my @pkgs = sort keys %pkgs_for_this_format;
&debug (" packages for $format: @pkgs\n");
@@ -268,32 +268,42 @@ sub pkgs_per_format {
}
-# Compare lists of required packages with lists of existing trigger
-# directives. Return 0 if identical, 1 otherwise (and report
-# differences).
+# Compare lists of packages required by building (PKGS_PER_FORMAT) with
+# lists of existing trigger directives (FMTTRIGGER). Return 0 if
+# identical, 1 otherwise (and report differences). Ignore hyphenation
+# dependencies and the package itself containing the trigger directive
+# (FMTPKGCONTAINERS).
#
sub compare_pkgs_and_triggers {
- my ($pkgs_per_format,$fmttriggers) = @_;
+ my ($pkgs_per_format,$fmttriggers,$fmtpkgcontainers) = @_;
my $bad_p = 0;
my $all_pkgs = 0;
+ # we don't include these as fmttriggers since when they meaningfully
+ # change, fmtutil should get called anyway due to language.* changing.
+ my @skip_pkgs = qw(dehyph-exptl hyph-utf8 ruhyphen ukrhyph);
+ # Anything matching hyphen-.* is also ignored.
+
for my $ef (sort keys %$pkgs_per_format) {
my @recorded_pkgs = @{$pkgs_per_format->{$ef}};
$all_pkgs += @recorded_pkgs;
my %recorded_pkgs;
- @recorded_pkgs{@recorded_pkgs} = (); # hash slice for recorded files
+ @recorded_pkgs{@recorded_pkgs} = (); # hash slice for recorded pkgs
if (defined $fmttriggers->{$ef}) {
my @tlpdb_pkgs = @{$fmttriggers->{$ef}};
my %tlpdb_pkgs;
- @tlpdb_pkgs{@tlpdb_pkgs} = (); # hash slice for the tlpdb side
+ @tlpdb_pkgs{@tlpdb_pkgs} = (); # hash slice for tlpdb pkgs
my @recorded_only = ();
for my $r (keys %recorded_pkgs) {
if (exists $tlpdb_pkgs{$r}) {
delete $tlpdb_pkgs{$r}; # ok, in both
} else {
+ next if grep ($_ eq $r, @skip_pkgs);
+ next if $r =~ /hyphen-.*/;
+ next if $r eq $fmtpkgcontainers->{$ef};
push (@recorded_only, $r);
}
}
@@ -370,12 +380,9 @@ L<TeXLive::TLUtils> for details.
=head1 DESCRIPTION
-This program removes the binary directories of the platforms given as
-arguments; that is, remove the binfiles entries in the tlpdb, and remove
-the containers. (Any xz and wget binaries for the installer remain, though.)
-
-It is used during DVD production to exclude certain platforms, and is
-run from the L<tl-update-images> script.
+Compare the fmttriggers= listed in the tlpsrc files with the actual
+dependencies found by running fmtutil -recorder and inspecting the
+recorder (.fls) files.
=head1 AUTHORS AND COPYRIGHT
diff --git a/Master/tlpkg/tlpsrc/latex-bin.tlpsrc b/Master/tlpkg/tlpsrc/latex-bin.tlpsrc
index 23e8373514e..90e1315bddb 100644
--- a/Master/tlpkg/tlpsrc/latex-bin.tlpsrc
+++ b/Master/tlpkg/tlpsrc/latex-bin.tlpsrc
@@ -11,13 +11,13 @@ binpattern f bin/${ARCH}/latex
execute AddFormat name=latex engine=pdftex \
patterns=language.dat \
options="-translate-file=cp227.tcx *latex.ini" \
- fmttriggers=${fmtcomm}
+ fmttriggers=${fmtcomm},latexconfig
#
binpattern f bin/${ARCH}/pdflatex
execute AddFormat name=pdflatex engine=pdftex \
patterns=language.dat \
options="-translate-file=cp227.tcx *pdflatex.ini" \
- fmttriggers=${fmtcomm}
+ fmttriggers=${fmtcomm},latexconfig
#
binpattern f bin/${ARCH}/dvilualatex
execute AddFormat name=dvilualatex engine=luatex \
diff --git a/Master/tlpkg/tlpsrc/lollipop.tlpsrc b/Master/tlpkg/tlpsrc/lollipop.tlpsrc
index 43d96dd341c..4fbacde00bf 100644
--- a/Master/tlpkg/tlpsrc/lollipop.tlpsrc
+++ b/Master/tlpkg/tlpsrc/lollipop.tlpsrc
@@ -1,4 +1,4 @@
binpattern f bin/${ARCH}/lollipop
execute AddFormat name=lollipop engine=tex \
options="lollipop.ini" \
- fmttriggers=cm,hyphen-base,lollipop,tex-ini-files
+ fmttriggers=cm,hyphen-base,lollipop
diff --git a/Master/tlpkg/tlpsrc/platex.tlpsrc b/Master/tlpkg/tlpsrc/platex.tlpsrc
index 2e423aea86d..d1a4acc84b8 100644
--- a/Master/tlpkg/tlpsrc/platex.tlpsrc
+++ b/Master/tlpkg/tlpsrc/platex.tlpsrc
@@ -1,8 +1,6 @@
-tlpsetvar fmtcomm cm,hyphen-base,ptex
-#
execute AddFormat name=platex engine=eptex options="*platex.ini" \
patterns=language.dat \
- fmttriggers=${fmtcomm},babel,latex,latex-fonts
+ fmttriggers=babel,cm,hyphen-base,latex,latex-fonts,ptex-fonts
#
binpattern f bin/${ARCH}/platex
diff --git a/Master/tlpkg/tlpsrc/ptex.tlpsrc b/Master/tlpkg/tlpsrc/ptex.tlpsrc
index 7e4a86a1bd0..41a930ef30a 100644
--- a/Master/tlpkg/tlpsrc/ptex.tlpsrc
+++ b/Master/tlpkg/tlpsrc/ptex.tlpsrc
@@ -9,14 +9,14 @@ depend pbibtex-base
depend ptex-base
depend ptex-fonts
-tlpsetvar fmtcomm cm,hyphen-base,ptex
+tlpsetvar fmtcomm cm,hyphen-base,knuth-lib,plain,ptex-base,ptex-fonts
#
execute AddFormat name=ptex engine=ptex options="ptex.ini" \
- fmttriggers=${fmtcomm},knuth-lib,plain
+ fmttriggers=${fmtcomm}
#
execute AddFormat name=eptex engine=eptex options="*eptex.ini" \
patterns=language.def \
- fmttriggers=${fmtcomm},etex,knuth-lib,plain
+ fmttriggers=${fmtcomm},etex
binpattern f bin/${ARCH}/eptex
binpattern f bin/${ARCH}/makejvf
diff --git a/Master/tlpkg/tlpsrc/uptex.tlpsrc b/Master/tlpkg/tlpsrc/uptex.tlpsrc
index 9f7b9a40acf..52642c5b4c0 100644
--- a/Master/tlpkg/tlpsrc/uptex.tlpsrc
+++ b/Master/tlpkg/tlpsrc/uptex.tlpsrc
@@ -9,14 +9,14 @@ depend ptex
depend uptex-base
depend uptex-fonts
-tlpsetvar fmtcomm cm,hyphen-base,uptex
+tlpsetvar fmtcomm cm,hyphen-base,knuth-lib,plain,uptex-base,uptex-fonts
#
execute AddFormat name=uptex engine=uptex options="uptex.ini" \
- fmttriggers=${fmtcomm},knuth-lib,plain,uptex
+ fmttriggers=${fmtcomm}
#
execute AddFormat name=euptex engine=euptex options="*euptex.ini" \
patterns=language.def \
- fmttriggers=${fmtcomm},etex,knuth-lib,plain,ptex
+ fmttriggers=${fmtcomm},etex,ptex-base
#
execute addKanjiMap uptex-@kanjiEmbed@@kanjiVariant@.map
diff --git a/Master/tlpkg/tlpsrc/xetex.tlpsrc b/Master/tlpkg/tlpsrc/xetex.tlpsrc
index b293bac63f3..cfb213258ea 100644
--- a/Master/tlpkg/tlpsrc/xetex.tlpsrc
+++ b/Master/tlpkg/tlpsrc/xetex.tlpsrc
@@ -2,7 +2,7 @@ category TLCore
shortdesc Unicode and OpenType-enabled TeX engine.
longdesc See http://tug.org/xetex.
-tlpsetvar fmtcomm cm,hyphen-base
+tlpsetvar fmtcomm cm,hyphen-base,tex-ini-files,unicode-data
#
execute AddFormat name=xetex engine=xetex patterns=language.def \
options="-etex xetex.ini" \
@@ -10,7 +10,7 @@ execute AddFormat name=xetex engine=xetex patterns=language.def \
#
execute AddFormat name=xelatex engine=xetex patterns=language.dat \
options="-etex xelatex.ini" \
- fmttriggers=${fmtcomm},babel,latex,latex-fonts,unicode-data
+ fmttriggers=${fmtcomm},babel,latex,latex-fonts
# do fontconfig stuff, especially on Windows.
postaction script file=tlpkg/tlpostcode/xetex.pl