diff options
author | Norbert Preining <preining@logic.at> | 2017-04-16 02:14:07 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2017-04-16 02:14:07 +0000 |
commit | efbb8161f75b4b347656e7fd5f621960b3c3e0aa (patch) | |
tree | 412de0712166afef8678b3d4fa6618e878844c58 /Master/install-tl | |
parent | 5913c85040504aee4109a34aaad42020b7feff38 (diff) |
use tlpdbopt_ instead of option_
git-svn-id: svn://tug.org/texlive/trunk@43831 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/install-tl')
-rwxr-xr-x | Master/install-tl | 114 |
1 files changed, 57 insertions, 57 deletions
diff --git a/Master/install-tl b/Master/install-tl index d3e1a16fcaf..2368ff9f6d7 100755 --- a/Master/install-tl +++ b/Master/install-tl @@ -124,15 +124,15 @@ our @collections_std; # needs to be our since TeXLive::TLUtils uses it # # The following values are taken from the remote tlpdb using the -# $tlpdb->option_XXXXX +# $tlpdb->tlpdbopt_XXXXX # settings (i.e., taken from tlpkg/tlpsrc/00texlive.installation.tlpsrc # -# 'option_sys_bin' => '/usr/local/bin', -# 'option_sys_man' => '/usr/local/man', -# 'option_sys_info' => '/usr/local/info', -# 'option_install_docfiles' => 1, -# 'option_install_srcfiles' => 1, -# 'option_create_formats' => 0, +# 'tlpdbopt_sys_bin' => '/usr/local/bin', +# 'tlpdbopt_sys_man' => '/usr/local/man', +# 'tlpdbopt_sys_info' => '/usr/local/info', +# 'tlpdbopt_install_docfiles' => 1, +# 'tlpdbopt_install_srcfiles' => 1, +# 'tlpdbopt_create_formats' => 0, our %vars=( # 'n_' means 'number of'. 'this_platform' => '', 'n_systems_available' => 0, @@ -194,7 +194,7 @@ $::alternative_selector = 0; # do not debug translations by default $::debug_translation = 0; -# some strings to describe the different meanings of option_file_assoc +# some strings to describe the different meanings of tlpdbopt_file_assoc $::fileassocdesc[0] = "None"; $::fileassocdesc[1] = "Only new"; $::fileassocdesc[2] = "All"; @@ -776,14 +776,14 @@ sub final_remote_init { sub do_installation { if (win32()) { - non_admin() if !$vars{'option_w32_multi_user'}; + non_admin() if !$vars{'tlpdbopt_w32_multi_user'}; } if ($vars{'instopt_portable'}) { - $vars{'option_desktop_integration'} = 0; - $vars{'option_menu_integration'} = 0; - $vars{'option_file_assocs'} = 0; + $vars{'tlpdbopt_desktop_integration'} = 0; + $vars{'tlpdbopt_menu_integration'} = 0; + $vars{'tlpdbopt_file_assocs'} = 0; $vars{'instopt_path'} = 0; - $vars{'option_w32_multi_user'} = 0; + $vars{'tlpdbopt_w32_multi_user'} = 0; } if ($vars{'selected_scheme'} ne "scheme-infraonly" && $vars{'n_collections_selected'} <= 0) { @@ -1065,7 +1065,7 @@ operations might be disturbed.\n\n"; # option settings in launcher.ini if (win32() && !$vars{'instopt_portable'}) { - if ($vars{'option_file_assocs'} != 1 || !$vars{'instopt_path'}) { + if ($vars{'tlpdbopt_file_assocs'} != 1 || !$vars{'instopt_path'}) { # create higher priority tlaunch.ini with adjusted settings # whether or not launcher mode (desktop integration 2) # was selected @@ -1077,7 +1077,7 @@ operations might be disturbed.\n\n"; $errcount += wsystem("re-running", "mktexlsr", $TEXMFSYSVAR,$TEXMFSYSCONFIG); if (win32() and !$vars{'instopt_portable'} and !$opt_in_place) { - if ($vars{'option_desktop_integration'} != 2) { + if ($vars{'tlpdbopt_desktop_integration'} != 2) { create_uninstaller($vars{'TEXDIR'}); } else { $errcount += wsystem ( @@ -1094,7 +1094,7 @@ operations might be disturbed.\n\n"; } # all formats option - if ($vars{'option_create_formats'}) { + if ($vars{'tlpdbopt_create_formats'}) { if (-x "$plat_bindir/fmtutil-sys$progext") { info("pre-generating all format files, be patient...\n"); $errcount += run_postinst_cmd( @@ -1109,7 +1109,7 @@ operations might be disturbed.\n\n"; # for portable, this option should be unset # it should not be necessary to test separately for portable do_path_adjustments() if - $vars{'instopt_path'} and $vars{option_desktop_integration} != 2; + $vars{'instopt_path'} and $vars{tlpdbopt_desktop_integration} != 2; # now do the system integration: # on unix this means setting up symlinks @@ -1135,19 +1135,19 @@ sub do_tlpdb_postactions { foreach my $package ($usedtlpdb->list_packages) { # !!! alert: parameter 4 is menu shortcuts, parameter 5 does nothing !!! - if ($vars{'option_desktop_integration'}==2) { + if ($vars{'tlpdbopt_desktop_integration'}==2) { # skip creation of shortcuts and file associations if (!TeXLive::TLUtils::do_postaction( "install", $usedtlpdb->get_package($package), - 0, 0, 0, $vars{'option_post_code'})) { $ret += 1; } + 0, 0, 0, $vars{'tlpdbopt_post_code'})) { $ret += 1; } } else { # create shortcuts and file associations # according to corresponding options if (!TeXLive::TLUtils::do_postaction( "install", $usedtlpdb->get_package($package), - $vars{'option_file_assocs'}, - $vars{'option_desktop_integration'}, 0, - $vars{'option_post_code'})) { $ret += 1; } + $vars{'tlpdbopt_file_assocs'}, + $vars{'tlpdbopt_desktop_integration'}, 0, + $vars{'tlpdbopt_post_code'})) { $ret += 1; } } } # windows: alert the system about changed file associations @@ -1177,7 +1177,7 @@ sub rewrite_tlaunch_ini { $\ = "\n"; print OUT $ini; print OUT "[General]"; - print OUT "FILETYPES=$fts[$vars{'option_file_assocs'}]"; + print OUT "FILETYPES=$fts[$vars{'tlpdbopt_file_assocs'}]"; print OUT "SEARCHPATH=$vars{'instopt_path'}\n"; close OUT; `mktexlsr $tmfsysvar`; @@ -1197,12 +1197,12 @@ sub do_path_adjustments { info ("running path adjustment actions\n"); if (win32()) { TeXLive::TLUtils::w32_add_to_path($vars{'TEXDIR'}.'/bin/win32', - $vars{'option_w32_multi_user'}); + $vars{'tlpdbopt_w32_multi_user'}); broadcast_env(); } else { TeXLive::TLUtils::add_symlinks($vars{'TEXDIR'}, $vars{'this_platform'}, - $vars{'option_sys_bin'}, $vars{'option_sys_man'}, - $vars{'option_sys_info'}); + $vars{'tlpdbopt_sys_bin'}, $vars{'tlpdbopt_sys_man'}, + $vars{'tlpdbopt_sys_info'}); } info ("finished with path adjustment actions\n"); } # do_path_adjustments @@ -1564,8 +1564,8 @@ sub calc_depends { $install{$p} = 0; next; } - $size+=$tlpobj->docsize if $vars{'option_install_docfiles'}; - $size+=$tlpobj->srcsize if $vars{'option_install_srcfiles'}; + $size+=$tlpobj->docsize if $vars{'tlpdbopt_install_docfiles'}; + $size+=$tlpobj->srcsize if $vars{'tlpdbopt_install_srcfiles'}; $size+=$tlpobj->runsize; foreach $a (@archs) { $size += $tlpobj->binsize->{$a} if defined($tlpobj->binsize->{$a}); @@ -1627,18 +1627,18 @@ END_EXPLICIT_MIRROR # since we might have loaded values via a -profile-seed, # make sure that we don't overwrite default values for my $o (keys %TeXLive::TLConfig::TLPDBOptions) { - $vars{"option_$o"} = $tlpdb->option($o) - if (!defined($profiledata{"option_$o"})); + $vars{"tlpdbopt_$o"} = $tlpdb->option($o) + if (!defined($profiledata{"tlpdbopt_$o"})); } if (win32()) { # below, we really mean (start) menu integration. # 2016: always menu shortcuts, never desktop shortcuts, whatever the setting # 2017: new option value 2: launcher instead of menu. # in portable case, shortcuts sanitized away elsewhere - $vars{'option_desktop_integration'} = 1; + $vars{'tlpdbopt_desktop_integration'} = 1; # we have to make sure that this option is set to 0 in case # that a non-admin is running the installations program - $vars{'option_w32_multi_user'} = 0 if (!admin()); + $vars{'tlpdbopt_w32_multi_user'} = 0 if (!admin()); } # select scheme: either $vars{'selected_scheme'} or $default_scheme @@ -1779,9 +1779,9 @@ sub create_profile { foreach my $key (sort keys %vars) { print $fh "$key $vars{$key}\n" if $save_cols and $key=~/^collection/ and $vars{$key}==1; - # we don't save option_location - next if ($key eq "option_location"); - print $fh "$key $vars{$key}\n" if $key =~ /^option_/; + # we don't save tlpdbopt_location + next if ($key eq "tlpdbopt_location"); + print $fh "$key $vars{$key}\n" if $key =~ /^tlpdbopt_/; 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}); @@ -1821,9 +1821,9 @@ sub read_profile { } next; } - if (m/^option_/) { + if (m/^tlpdbopt_/) { my $o = $_; - $o =~ s/^option_//; + $o =~ s/^tlpdbopt_//; # we do not support setting the location in the profile # could be done, but might be tricky .. next if ($o eq 'location'); @@ -1897,8 +1897,8 @@ sub read_profile { sub sanitise_options { # portable option overrides any system integration options $vars{'instopt_path'} = 0 if $vars{'instopt_portable'}; - $vars{'option_file_assocs'} = 0 if $vars{'instopt_portable'}; - $vars{'option_desktop_integration'} = 0 if $vars{'instopt_portable'}; + $vars{'tlpdbopt_file_assocs'} = 0 if $vars{'instopt_portable'}; + $vars{'tlpdbopt_desktop_integration'} = 0 if $vars{'instopt_portable'}; } # sanitise_options sub do_install_packages { @@ -1914,7 +1914,7 @@ sub do_install_packages { $localtlpdb->option ("file_assocs", "0"); $localtlpdb->option ("post_code", "0"); if (!install_packages($tlpdb,$media,$localtlpdb,\@what, - $vars{'option_install_srcfiles'},$vars{'option_install_docfiles'})) { + $vars{'tlpdbopt_install_srcfiles'},$vars{'tlpdbopt_install_docfiles'})) { my $profile_name = "installation.profile"; create_profile($profile_name); tlwarn("Installation failed.\n"); @@ -1932,9 +1932,9 @@ sub do_install_packages { } # restore options in tlpdb $localtlpdb->option ( - "desktop_integration", $vars{'option_desktop_integration'}); - $localtlpdb->option ("file_assocs", $vars{'option_file_assocs'}); - $localtlpdb->option ("post_code", $vars{'option_post_code'} ? "1" : "0"); + "desktop_integration", $vars{'tlpdbopt_desktop_integration'}); + $localtlpdb->option ("file_assocs", $vars{'tlpdbopt_file_assocs'}); + $localtlpdb->option ("post_code", $vars{'tlpdbopt_post_code'} ? "1" : "0"); $localtlpdb->save; } # do_install_packages @@ -1952,7 +1952,7 @@ sub save_options_into_tlpdb { $localtlpdb->option ("location", $final_loc); } for my $o (keys %TeXLive::TLConfig::TLPDBOptions) { - $localtlpdb->option ($o, $vars{"option_$o"}); + $localtlpdb->option ($o, $vars{"tlpdbopt_$o"}); } my @archs; foreach (keys %vars) { @@ -2079,25 +2079,25 @@ sub import_settings_from_old_tlpdb { # # now for the settings # set the defaults to what is specified in the tlpdb - $vars{'option_install_docfiles'} = + $vars{'tlpdbopt_install_docfiles'} = $previoustlpdb->option_pkg("00texlive.installation", "install_docfiles"); - $vars{'option_install_srcfiles'} = + $vars{'tlpdbopt_install_srcfiles'} = $previoustlpdb->option_pkg("00texlive.installation", "install_srcfiles"); - $vars{'option_create_formats'} = + $vars{'tlpdbopt_create_formats'} = $previoustlpdb->option_pkg("00texlive.installation", "create_formats"); - $vars{'option_desktop_integration'} = 1 if win32(); + $vars{'tlpdbopt_desktop_integration'} = 1 if win32(); $vars{'instopt_path'} = $previoustlpdb->option_pkg("00texlive.installation", "path"); $vars{'instopt_path'} = 0 if !defined($vars{'instopt_path'}); $vars{'instopt_path'} = 1 if win32(); - $vars{'option_sys_bin'} = + $vars{'tlpdbopt_sys_bin'} = $previoustlpdb->option_pkg("00texlive.installation", "sys_bin"); - $vars{'option_sys_man'} = + $vars{'tlpdbopt_sys_man'} = $previoustlpdb->option_pkg("00texlive.installation", "sys_man"); $vars{'sys_info'} = @@ -2678,18 +2678,18 @@ C<instopt_write18_restricted> (default 1, enable write8 for a restricted set of programs), C<instopt_path> (default 0 on Unix, 1 on Windows, adjust PATH environment). -=item B<tlpdb options> (those with prefix C<option_>) +=item B<tlpdb options> (those with prefix C<tlpdbopt_>) The definitive list is give in C<TeXLive::TLConfig.pm> in C<%TeXLive::TLConfig::TLPDBOptions>, together with explanations. -All items B<but> for C<option_location> can be specified. +All items B<but> for C<tlpdbopt_location> can be specified. The current list is given below: -C<option_autobackup>, C<option_backupdir>, C<option_create_formats>, -C<option_desktop_integration>, C<option_file_assocs>, C<option_install_docfiles>, -C<option_install_srcfiles>, C<option_post_code>, -C<option_sys_bin>, C<option_sys_info>, C<option_sys_man>, -C<option_w32_multi_user>, C<option_generate_updmap> +C<tlpdbopt_autobackup>, C<tlpdbopt_backupdir>, C<tlpdbopt_create_formats>, +C<tlpdbopt_desktop_integration>, C<tlpdbopt_file_assocs>, C<tlpdbopt_install_docfiles>, +C<tlpdbopt_install_srcfiles>, C<tlpdbopt_post_code>, +C<tlpdbopt_sys_bin>, C<tlpdbopt_sys_info>, C<tlpdbopt_sys_man>, +C<tlpdbopt_w32_multi_user>, C<tlpdbopt_generate_updmap> =item B<path options> |