summaryrefslogtreecommitdiff
path: root/Master/install-tl
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2017-04-16 02:13:23 +0000
committerNorbert Preining <preining@logic.at>2017-04-16 02:13:23 +0000
commit77eebb0917ca720ee9b5bb8a5be72bd1fa634709 (patch)
tree71b354c1121316dbd1b4795b7ebd06d278a9b3a4 /Master/install-tl
parent6953459a76c7d73e4cd1a2bfb57878c8f66e98fb (diff)
cleaner profile reading and writing
git-svn-id: svn://tug.org/texlive/trunk@43825 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/install-tl')
-rwxr-xr-xMaster/install-tl30
1 files changed, 27 insertions, 3 deletions
diff --git a/Master/install-tl b/Master/install-tl
index f2a7be86922..0dc55c7ae59 100755
--- a/Master/install-tl
+++ b/Master/install-tl
@@ -1757,6 +1757,7 @@ sub create_profile {
print $fh "$key $vars{$key}\n"
if $save_cols and $key=~/^collection/ and $vars{$key}==1;
print $fh "$key $vars{$key}\n" if $key =~ /^option_/;
+ print $fh "$key $vars{$key}\n" if $key =~ /^instopt_/;
print $fh "$key $vars{$key}\n" if (($key =~ /^binary_/) && $vars{$key});
print $fh "$key $vars{$key}\n" if $key =~ /^TEXDIR/;
print $fh "$key $vars{$key}\n" if $key =~ /^TEXMFSYSVAR/;
@@ -1765,7 +1766,6 @@ sub create_profile {
print $fh "$key $vars{$key}\n" if $key =~ /^TEXMFCONFIG/;
print $fh "$key $vars{$key}\n" if $key =~ /^TEXMFLOCAL/;
print $fh "$key $vars{$key}\n" if $key =~ /^TEXMFHOME/;
- print $fh "$key $vars{$key}\n" if $key =~ /^instopt_portable/;
}
if (!ref($profilepath)) {
close PROFILE;
@@ -1785,10 +1785,34 @@ sub read_profile {
$pro{$k} = $v;
}
foreach (keys %vars) {
- # clear out collections from var
+ # clear out collections from var, just to be sure
if (m/^collection-/) { $vars{$_} = 0; }
- if (defined($pro{$_})) { $vars{$_} = $pro{$_}; }
}
+ # initialize installer and tlpdb options
+ foreach (keys %pro) {
+ if (m/^instopt_/) {
+ if (defined($vars{$_})) {
+ $vars{$_} = $pro{$_};
+ delete($pro{$_});
+ }
+ }
+ if (m/^option_/) {
+ my $o = $_;
+ $o =~ s/^option_//;
+ if (defined($TeXLive::TLConfig::TLPDBOptions{$o})) {
+ $vars{$_} = $pro{$_};
+ delete($pro{$_});
+ }
+ }
+ }
+ # if there are still keys in the %pro array, some unknown keys have
+ # been written in the profile, bail out
+ if (my @foo = keys(%pro)) {
+ tlwarn("Unknown key in profile $profilepath: @foo\n");
+ tlwarn("Stopping here.\n");
+ exit(1);
+ }
+
# if a profile contains *only* the selected_scheme setting without
# any collection, we assume that exactely that scheme should be installed
my $coldefined = 0;