summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xMaster/install-tl43
1 files changed, 31 insertions, 12 deletions
diff --git a/Master/install-tl b/Master/install-tl
index 84004243552..0155b8c3108 100755
--- a/Master/install-tl
+++ b/Master/install-tl
@@ -938,7 +938,6 @@ sub do_texmf_cnf {
my @changedtmf = (); # install to disk: write only changed items
my $yyyy = $TeXLive::TLConfig::ReleaseYear;
- my $rewritetmflua = 0; # need a new texmfcnf.lua?
# we have to find TEXMFLOCAL TEXMFSYSVAR and TEXMFHOME
foreach my $line (@texmfcnflines) {
@@ -961,7 +960,6 @@ sub do_texmf_cnf {
} elsif ($line =~ m/^TEXMFVAR/) {
if ($vars{"TEXMFVAR"} ne "~/.texlive$yyyy/texmf-var") {
push @changedtmf, "TEXMFVAR = $vars{'TEXMFVAR'}\n";
- $rewritetmflua = 1; # TEXMFVAR change -> new texmfcnf.lua
}
} elsif ($line =~ m/^TEXMFCONFIG/) {
if ("$vars{'TEXMFCONFIG'}" ne "~/.texlive$yyyy/texmf-config") {
@@ -1018,21 +1016,42 @@ EOF
}
close(TMF) || warn "close($TMF) failed: $!";
- if ($rewritetmflua) {
- $TMFLUA = ">$vars{'TEXDIR'}/texmfcnf.lua";
- open(TMFLUA, $TMFLUA) || die "open($TMFLUA) failed: $!";
-
+ $TMFLUA = ">$vars{'TEXDIR'}/texmfcnf.lua";
+ open(TMFLUA, $TMFLUA) || die "open($TMFLUA) failed: $!";
print TMFLUA <<EOF;
-- (Public domain.)
--- This texmfcnf.lua file should exist only if you have personal changes
--- from the distributed file; for example, if TEXMFVAR was changed in
--- the installer.
+-- This texmfcnf.lua file should contain only your personal changes from the
+-- original texmfcnf.lua (for example, as chosen in the installer).
--
-return { TEXMFCACHE = '$vars{"TEXMFVAR"}' }
+-- That is, if you need to make changes to texmfcnf.lua, put your custom
+-- settings in this file, which is .../texlive/YYYY/texmfcnf.lua, rather than
+-- the distributed file (which is .../texlive/YYYY/texmf/web2c/texmfcnf.lua).
+-- And include *only* your changed values, not a copy of the whole thing!
+
+return {
+ content = {
+ variables = {
EOF
-
- close(TMFLUA) || warn "close($TMFLUA) failed: $!";
+;
+ foreach (@changedtmf) {
+ my $luavalue = $_;
+ $luavalue =~ s/^(\w+\s*=\s*)(.*)\s*$/$1\"$2\",/;
+ $luavalue =~ s/\$SELFAUTOPARENT/selfautoparent:/g;
+ print TMFLUA " $luavalue\n";
+ }
+ print TMFLUA " },\n";
+ print TMFLUA " },\n";
+ if (!$vars{"option_write18_restricted"}) {
+ print TMFLUA <<EOF;
+ directives = {
+ -- Disable system commands. See texmf/web2c/texmfcnf.lua
+ ["system.commandmode"] = "none",
+ },
+EOF
+;
}
+ print TMFLUA "}\n";
+ close(TMFLUA) || warn "close($TMFLUA) failed: $!";
}