diff options
author | Norbert Preining <preining@logic.at> | 2017-04-16 02:13:45 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2017-04-16 02:13:45 +0000 |
commit | feb6030b68e78f2bc10b5c93f5f14b1c4f2cf579 (patch) | |
tree | 1a44a0f8603763b166c641bd213314a6715ee297 /Master/install-tl | |
parent | f1bc728217cfe6abb4a9b2ed6d26202af0a9b01e (diff) |
profile reading revised
git-svn-id: svn://tug.org/texlive/trunk@43828 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/install-tl')
-rwxr-xr-x | Master/install-tl | 37 |
1 files changed, 29 insertions, 8 deletions
diff --git a/Master/install-tl b/Master/install-tl index 7c36957b532..31c688906e1 100755 --- a/Master/install-tl +++ b/Master/install-tl @@ -150,6 +150,16 @@ our %vars=( # 'n_' means 'number of'. 'instopt_path' => 0, ); +my %path_keys = ( + 'TEXMFLOCAL' => 1, + 'TEXMFCONFIG' => 1, + 'TEXMFSYSCONFIG' => 1, + 'TEXMFVAR' => 1, + 'TEXMFSYSVAR' => 1, + 'TEXDIR' => 1, + 'TEXMFHOME' => 1, +); + # option handling our $opt_in_place = 0; my $opt_gui = (win32() ? "wizard" : "text"); @@ -479,7 +489,7 @@ if (!setup_programs ("$::installerdir/tlpkg/installer", "$::_platform_")) { if ($opt_profile eq "") { if ($opt_profileseed) { - read_profile("$opt_profileseed"); + read_profile("$opt_profileseed", seed => 1); } # do the normal interactive installation. # @@ -1754,14 +1764,8 @@ sub create_profile { 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 defined($path_keys{$key}); 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/; - print $fh "$key $vars{$key}\n" if $key =~ /^TEXMFSYSCONFIG/; - print $fh "$key $vars{$key}\n" if $key =~ /^TEXMFVAR/; - 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/; } if (!ref($profilepath)) { close PROFILE; @@ -1770,6 +1774,7 @@ sub create_profile { sub read_profile { my $profilepath = shift; + my %opts = @_; open PROFILE, "<$profilepath" or die "$0: Cannot open profile $profilepath for reading.\n"; my %pro; @@ -1791,6 +1796,7 @@ sub read_profile { $vars{$_} = $pro{$_}; delete($pro{$_}); } + next; } if (m/^option_/) { my $o = $_; @@ -1799,6 +1805,18 @@ sub read_profile { $vars{$_} = $pro{$_}; delete($pro{$_}); } + next; + } + if (defined($path_keys{$_}) || m/^selected_scheme$/) { + $vars{$_} = $pro{$_}; + delete($pro{$_}); + next; + } + if (m/^binary_/) { + # we do not do any checking of validity of binaries! + $vars{$_} = $pro{$_}; + delete($pro{$_}); + next; } } # if there are still keys in the %pro array, some unknown keys have @@ -1820,6 +1838,9 @@ sub read_profile { } # if at least one collection has been defined return here return if $coldefined; + # if we are in seed mode, do not try to load remote db as it is + # not initialized by now + return if $opts{'seed'}; # since no collections have been defined in the profile, we # set those to be installed on which the scheme depends my $scheme=$tlpdb->get_package($vars{'selected_scheme'}); |