summaryrefslogtreecommitdiff
path: root/Master/install-tl
diff options
context:
space:
mode:
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;