summaryrefslogtreecommitdiff
path: root/Master/install-tl
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2017-04-16 02:13:17 +0000
committerNorbert Preining <preining@logic.at>2017-04-16 02:13:17 +0000
commit6953459a76c7d73e4cd1a2bfb57878c8f66e98fb (patch)
treec70ac38cf6a90f66d4ef3242e7dc4a08415ee13a /Master/install-tl
parent219afd32966778a9ba24a031a7a820c3288b4eba (diff)
more variable standardization for installer options
we now use instopt_ as prefix for installer only options that are not saved into the TLPDB. git-svn-id: svn://tug.org/texlive/trunk@43824 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/install-tl')
-rwxr-xr-xMaster/install-tl69
1 files changed, 35 insertions, 34 deletions
diff --git a/Master/install-tl b/Master/install-tl
index 4de67782fab..f2a7be86922 100755
--- a/Master/install-tl
+++ b/Master/install-tl
@@ -131,10 +131,9 @@ our @collections_std;
# 'option_sys_bin' => '/usr/local/bin',
# 'option_sys_man' => '/usr/local/man',
# 'option_sys_info' => '/usr/local/info',
-# 'option_doc' => 1,
-# 'option_src' => 1,
-# 'option_fmt' => 0,
-# 'option_letter' => 0,
+# 'option_install_docfiles' => 1,
+# 'option_install_srcfiles' => 1,
+# 'option_create_formats' => 0,
our %vars=( # 'n_' means 'number of'.
'this_platform' => '',
'n_systems_available' => 0,
@@ -145,7 +144,9 @@ our %vars=( # 'n_' means 'number of'.
'src_splitting_supported' => 1,
'doc_splitting_supported' => 1,
'selected_scheme' => $default_scheme,
- 'portable' => 0,
+ 'instopt_portable' => 0,
+ 'instopt_letter' => 0,
+ 'instopt_adjustrepo' => 1,
);
# option handling
@@ -730,7 +731,7 @@ sub final_remote_init {
$opt_in_place = 0;
}
$opt_scheme = "" if $opt_in_place;
- $vars{'portable'} = $opt_portable;
+ $vars{'instopt_portable'} = $opt_portable;
log("Installer revision: $::installerrevision\n");
log("Database revision: " . $tlpdb->config_revision . "\n");
@@ -764,7 +765,7 @@ sub do_installation {
if (win32()) {
non_admin() if !$vars{'option_w32_multi_user'};
}
- if ($vars{'portable'}) {
+ if ($vars{'instopt_portable'}) {
$vars{'option_desktop_integration'} = 0;
$vars{'option_menu_integration'} = 0;
$vars{'option_file_assocs'} = 0;
@@ -1041,7 +1042,7 @@ operations might be disturbed.\n\n";
# now work through the options if specified at all
# letter instead of a4
- if ($vars{'option_letter'}) {
+ if ($vars{'instopt_letter'}) {
# set paper size, but do not execute any post actions, which in this
# case would be mktexlsr and fmtutil-sys -all; clearly premature
# here in the installer.
@@ -1050,7 +1051,7 @@ operations might be disturbed.\n\n";
}
# option settings in launcher.ini
- if (win32() && !$vars{'portable'}) {
+ if (win32() && !$vars{'instopt_portable'}) {
if ($vars{'option_file_assocs'} != 1 || !$vars{'option_path'}) {
# create higher priority tlaunch.ini with adjusted settings
# whether or not launcher mode (desktop integration 2)
@@ -1062,7 +1063,7 @@ operations might be disturbed.\n\n";
# now rerun mktexlsr for updmap-sys and tlmgr paper letter updates.
$errcount += wsystem("re-running", "mktexlsr", $TEXMFSYSVAR,$TEXMFSYSCONFIG);
- if (win32() and !$vars{'portable'} and !$opt_in_place) {
+ if (win32() and !$vars{'instopt_portable'} and !$opt_in_place) {
if ($vars{'option_desktop_integration'} != 2) {
create_uninstaller($vars{'TEXDIR'});
} else {
@@ -1080,7 +1081,7 @@ operations might be disturbed.\n\n";
}
# all formats option
- if ($vars{'option_fmt'}) {
+ if ($vars{'option_create_formats'}) {
if (-x "$plat_bindir/fmtutil-sys$progext") {
info("pre-generating all format files, be patient...\n");
$errcount += run_postinst_cmd(
@@ -1242,7 +1243,7 @@ sub do_texmf_cnf {
}
}
- if ($vars{'portable'}) {
+ if ($vars{'instopt_portable'}) {
push @changedtmf, "ASYMPTOTE_HOME = \$TEXMFCONFIG/asymptote\n";
}
@@ -1286,7 +1287,7 @@ EOF
# to its version if available and 0 otherwise.
if (win32) {
my $use_ext = 0;
- if (!$vars{'portable'} &&
+ if (!$vars{'instopt_portable'} &&
defined $ENV{'extperl'} && $ENV{'extperl'} =~ /^(\d+\.\d+)/) {
$use_ext = 1 if $1 >= 5.14;
}
@@ -1393,7 +1394,7 @@ sub set_texlive_default_dirs {
$tex_prefix ||= '/usr/local/texlive';
}
# for portable and in_place installation we want everything in one directory
- $vars{'TEXDIR'} = ($vars{'portable'} || $opt_in_place)
+ $vars{'TEXDIR'} = ($vars{'instopt_portable'} || $opt_in_place)
? $tex_prefix : "$tex_prefix/$texlive_release";
my $texmfsysvar = getenv('TEXLIVE_INSTALL_TEXMFSYSVAR');
@@ -1426,7 +1427,7 @@ sub set_texlive_default_dirs {
$vars{'TEXMFCONFIG'} = $texmfconfig;
# for portable installation we want everything in one directory
- if ($vars{'portable'}) {
+ if ($vars{'instopt_portable'}) {
$vars{'TEXMFHOME'} = "\$TEXMFLOCAL";
$vars{'TEXMFVAR'} = "\$TEXMFSYSVAR";
$vars{'TEXMFCONFIG'} = "\$TEXMFSYSCONFIG";
@@ -1550,8 +1551,8 @@ sub calc_depends {
$install{$p} = 0;
next;
}
- $size+=$tlpobj->docsize if $vars{'option_doc'};
- $size+=$tlpobj->srcsize if $vars{'option_src'};
+ $size+=$tlpobj->docsize if $vars{'option_install_docfiles'};
+ $size+=$tlpobj->srcsize if $vars{'option_install_srcfiles'};
$size+=$tlpobj->runsize;
foreach $a (@archs) {
$size += $tlpobj->binsize->{$a} if defined($tlpobj->binsize->{$a});
@@ -1610,12 +1611,12 @@ END_EXPLICIT_MIRROR
if $do_die;
}
# set the defaults to what is specified in the tlpdb
- $vars{'option_doc'} = $tlpdb->option("install_docfiles");
- $vars{'option_src'} = $tlpdb->option("install_srcfiles");
- $vars{'option_fmt'} = $tlpdb->option("create_formats");
+ $vars{'option_install_docfiles'} = $tlpdb->option("install_docfiles");
+ $vars{'option_install_srcfiles'} = $tlpdb->option("install_srcfiles");
+ $vars{'option_create_formats'} = $tlpdb->option("create_formats");
$vars{'option_autobackup'} = $tlpdb->option("autobackup");
$vars{'option_backupdir'} = $tlpdb->option("backupdir");
- $vars{'option_letter'} = defined($tlpdb->option("paper"))
+ $vars{'instopt_letter'} = defined($tlpdb->option("paper"))
&& ($tlpdb->option("paper") eq "letter" ? 1 : 0);
# below, we really mean (start) menu integration.
# 2016: always menu shortcuts, never desktop shortcuts, whatever the setting
@@ -1764,7 +1765,7 @@ 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 =~ /^portable/;
+ print $fh "$key $vars{$key}\n" if $key =~ /^instopt_portable/;
}
if (!ref($profilepath)) {
close PROFILE;
@@ -1814,9 +1815,9 @@ sub read_profile {
# helper subroutine to do sanity check of options before installation
sub sanitise_options {
# portable option overrides any system integration options
- $vars{'option_path'} = 0 if $vars{'portable'};
- $vars{'option_file_assocs'} = 0 if $vars{'portable'};
- $vars{'option_desktop_integration'} = 0 if $vars{'portable'};
+ $vars{'option_path'} = 0 if $vars{'instopt_portable'};
+ $vars{'option_file_assocs'} = 0 if $vars{'instopt_portable'};
+ $vars{'option_desktop_integration'} = 0 if $vars{'instopt_portable'};
} # sanitise_options
sub do_install_packages {
@@ -1832,7 +1833,7 @@ sub do_install_packages {
$localtlpdb->option ("file_assocs", "0");
$localtlpdb->option ("post_code", "0");
if (!install_packages($tlpdb,$media,$localtlpdb,\@what,
- $vars{'option_src'},$vars{'option_doc'})) {
+ $vars{'option_install_srcfiles'},$vars{'option_install_docfiles'})) {
my $profile_name = "installation.profile";
create_profile($profile_name);
tlwarn("Installation failed.\n");
@@ -1863,7 +1864,7 @@ sub save_options_into_tlpdb {
# if we are told to adjust the repository *and* we are *not*
# installing from the network already, we adjust the repository
# to the default mirror.ctan.org
- if ($vars{'adjustrepo'} && ($media ne 'NET')) {
+ if ($vars{'instopt_adjustrepo'} && ($media ne 'NET')) {
$localtlpdb->option ("location", $TeXLiveURL);
} else {
my $final_loc = ($media eq 'NET' ? $location : abs_path($location));
@@ -1871,7 +1872,7 @@ sub save_options_into_tlpdb {
}
$localtlpdb->option ("autobackup", $vars{'option_autobackup'});
$localtlpdb->option ("backupdir", $vars{'option_backupdir'});
- $localtlpdb->option ("create_formats", $vars{'option_fmt'} ? "1" : "0");
+ $localtlpdb->option ("create_formats", $vars{'option_create_formats'} ? "1" : "0");
$localtlpdb->option (
"desktop_integration", $vars{'option_desktop_integration'});
$localtlpdb->option ("file_assocs", $vars{'option_file_assocs'});
@@ -1879,8 +1880,8 @@ sub save_options_into_tlpdb {
$localtlpdb->option ("sys_bin", $vars{'option_sys_bin'});
$localtlpdb->option ("sys_info", $vars{'option_sys_info'});
$localtlpdb->option ("sys_man", $vars{'option_sys_man'});
- $localtlpdb->option ("install_docfiles", $vars{'option_doc'} ? "1" : "0");
- $localtlpdb->option ("install_srcfiles", $vars{'option_src'} ? "1" : "0");
+ $localtlpdb->option ("install_docfiles", $vars{'option_install_docfiles'} ? "1" : "0");
+ $localtlpdb->option ("install_srcfiles", $vars{'option_install_srcfiles'} ? "1" : "0");
$localtlpdb->option (
"w32_multi_user", $vars{'option_w32_multi_user'} ? "1" : "0");
my @archs;
@@ -2008,13 +2009,13 @@ sub import_settings_from_old_tlpdb {
#
# now for the settings
# set the defaults to what is specified in the tlpdb
- $vars{'option_doc'} =
+ $vars{'option_install_docfiles'} =
$previoustlpdb->option_pkg("00texlive.installation",
"install_docfiles");
- $vars{'option_src'} =
+ $vars{'option_install_srcfiles'} =
$previoustlpdb->option_pkg("00texlive.installation",
"install_srcfiles");
- $vars{'option_fmt'} =
+ $vars{'option_create_formats'} =
$previoustlpdb->option_pkg("00texlive.installation",
"create_formats");
$vars{'option_desktop_integration'} = 1 if win32();
@@ -2079,7 +2080,7 @@ sub import_settings_from_old_tlpdb {
tlwarn("You will need to select your preferred paper sizes manually.\n\n");
} else {
if ($common_paper eq "letter") {
- $vars{'option_letter'} = 1;
+ $vars{'instopt_letter'} = 1;
} elsif ($common_paper eq "a4") {
# do nothing
} else {