diff options
-rwxr-xr-x | Master/install-tl | 13 | ||||
-rw-r--r-- | Master/tlpkg/installer/install-menu-perltk.pl | 11 | ||||
-rwxr-xr-x | Master/tlpkg/installer/install-menu-text.pl | 14 | ||||
-rw-r--r-- | Master/tlpkg/tlpsrc/00texlive.installation.tlpsrc | 1 |
4 files changed, 37 insertions, 2 deletions
diff --git a/Master/install-tl b/Master/install-tl index eb394890a32..d993f612384 100755 --- a/Master/install-tl +++ b/Master/install-tl @@ -132,6 +132,7 @@ our @collections_lang_doc; # 'option_src' => 1, # 'option_fmt' => 0, # 'option_letter' => 0, +# 'option_adjustrepo' => 1, our %vars=( # 'n_' means 'number of'. 'this_platform' => '', 'n_systems_available' => 0, @@ -310,7 +311,7 @@ my $finished = 0; @::info_hook = (); my $system_tmpdir=get_system_tmpdir(); -my $media; +our $media; our @media_available; # special uses of install-tl: @@ -1391,6 +1392,7 @@ END_EXPLICIT_MIRROR $vars{'option_sys_bin'} = $tlpdb->option("sys_bin"); $vars{'option_sys_man'} = $tlpdb->option("sys_man"); $vars{'option_sys_info'} = $tlpdb->option("sys_info"); + $vars{'option_adjustrepo'} = $tlpdb->option("adjustrepo"); $vars{'option_write18_restricted'} = $tlpdb->option("write18_restricted"); # this option is not stored in tlpdb if an existing installation is used $vars{'option_write18_restricted'} ||= 1; @@ -1591,7 +1593,14 @@ sub do_install_packages { # into the local tlpdb: # - should links be set, and if yes, the destination (bin,man,info) sub save_options_into_tlpdb { - $localtlpdb->option ("location", $location); + # 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{'option_adjustrepo'} && ($media ne 'NET')) { + $localtlpdb->option ("location", $TeXLiveURL); + } else { + $localtlpdb->option ("location", $location); + } $localtlpdb->option ("autobackup", $vars{'option_autobackup'}); $localtlpdb->option ("backupdir", $vars{'option_backupdir'}); $localtlpdb->option ("create_formats", $vars{'option_fmt'} ? "1" : "0"); diff --git a/Master/tlpkg/installer/install-menu-perltk.pl b/Master/tlpkg/installer/install-menu-perltk.pl index b829c81b88e..dbcbbecf08c 100644 --- a/Master/tlpkg/installer/install-menu-perltk.pl +++ b/Master/tlpkg/installer/install-menu-perltk.pl @@ -40,6 +40,7 @@ our @collections_lang; our @collections_lang_doc; our $texlive_release; our @media_available; +our $media; our $MENU_INSTALL = 0; our $MENU_ABORT = 1; @@ -75,6 +76,7 @@ my $doc_files_toggle_button; my $src_files_toggle_button; my $texworks_toggle_button; my $load_remote_button; +my $adjustrepo_toggle_button; my $bintextbutton; my $schemebutton; my $tmflocalbutton; @@ -108,6 +110,7 @@ my $editoryesno; my $adminallyesno; my $docyesno; my $restrictedyesno; +my $adjustrepoyesno; $::run_menu = \&run_menu_perltk; @@ -128,6 +131,7 @@ sub setup_perltk_local_vars { $adminallyesno = ( $vars{'option_w32_multi_user'} ? __("Yes") : __("No") ); $docyesno = ( $vars{'option_doc'} ? __("Yes") : __("No") ); $restrictedyesno = ( $vars{'option_write18_restricted'} ? __("Yes") : __("No") ); + $adjustrepoyesno = ( $vars{'option_adjustrepo'} ? __("Yes") : __("No") ); } sub menu_abort { @@ -198,6 +202,7 @@ sub change_button_state { $paper_toggle_button->configure(-state => $what); $write_eighteen_toggle_button->configure(-state => $what); $format_toggle_button->configure(-state => $what); + $adjustrepo_toggle_button->configure(-state => $what); $pathbutton->configure(-state => $what); $doc_files_toggle_button->configure(-state => $what) if defined($doc_files_toggle_button); $src_files_toggle_button->configure(-state => $what) if defined($src_files_toggle_button); @@ -486,6 +491,12 @@ Please select a different mirror.', $TeXLive::TLConfig::ReleaseYear, $texlive_re $texworks_toggle_button = $fr->Button(-text => __("Toggle"), -command => sub { toggle_and_set_opt_variable(\$vars{'collection-texworks'}, \$editoryesno); })->grid(-row => $row, -column => 3, -sticky => "ew", -padx => "2m"); } } + if ($media ne 'NET') { + $row++; + $fr->Label(-text => __('Setup default repository for network updates'), -anchor => 'w')->grid(-row => $row, -column => 1, -sticky => 'w'); + $fr->Label(-anchor => 'w', -textvariable => \$adjustrepoyesno)->grid(-row => $row, -column => 2, -padx => "2m"); + $adjustrepo_toggle_button = $fr->Button(-text => __("Toggle"), -command => sub { toggle_and_set_opt_variable(\$vars{'option_adjustrepo'}, \$adjustrepoyesno); })->grid(-row => $row, -column => 3, -sticky => "ew", -padx => "2m"); + } if ($vars{'portable'}) { for $b ($pathbutton, $deskintbutton, $assocbutton, $adminbutton) { diff --git a/Master/tlpkg/installer/install-menu-text.pl b/Master/tlpkg/installer/install-menu-text.pl index 4a4f64dab42..d2f4fbb1b64 100755 --- a/Master/tlpkg/installer/install-menu-text.pl +++ b/Master/tlpkg/installer/install-menu-text.pl @@ -14,6 +14,7 @@ use vars qw(@::end_install_hook $::opt_no_cls); our %vars; our $tlpdb; our @media_available; +our $media; our $previoustlpdb; our @collections_std; our @collections_lang; @@ -832,6 +833,7 @@ sub options_menu { my $b_src=button($vars{'option_src'}); my $b_fmt=button($vars{'option_fmt'}); my $b_letter=button($vars{'option_letter'}); + my $b_adjustrepo=button($vars{'option_adjustrepo'}); my $b_deskint=button($vars{'option_desktop_integration'}); my $b_admin=button($vars{'option_w32_multi_user'}); my $b_addoneditor=button($vars{'collection-texworks'}); @@ -893,6 +895,9 @@ EOF if (win32() || $::opt_all_options) { print " <W> install TeXworks front end: $b_addoneditor\n"; } + if ($media ne "NET") { + print " <Y> Setup default repo for network updates: $b_adjustrepo\n"; + } other_options qw(R Q diskspace); my $answer = prompt 'Enter command'; @@ -993,6 +998,10 @@ EOF toggle 'collection-texworks'; return $command{'self'}; + } elsif ("\u$answer" eq 'Y' and $media ne "NET") { + toggle 'option_adjustrepo'; + return $command{'self'}; + } else { print "Unknown or unsupported command: $answer\n\n"; return $command{'self'}; @@ -1040,6 +1049,7 @@ sub main_menu { my $b_admin=button($vars{'option_w32_multi_user'}); my $b_addoneditor=button($vars{'collection-texworks'}); my $b_restricted=button($vars{'option_write18_restricted'}); + my $b_adjustrepo=button($vars{'option_adjustrepo'}); my $warn_nobin; @@ -1162,6 +1172,10 @@ EOF ($vars{'portable'} || win32()); } + if ($media ne 'NET') { + print " $b_adjustrepo setup default repository for network updates\n"; + } + if ($vars{'portable'}) { print "\n <V> set up for regular installation to hard disk\n"; } else { diff --git a/Master/tlpkg/tlpsrc/00texlive.installation.tlpsrc b/Master/tlpkg/tlpsrc/00texlive.installation.tlpsrc index f44e6b64587..ceb5d295b0a 100644 --- a/Master/tlpkg/tlpsrc/00texlive.installation.tlpsrc +++ b/Master/tlpkg/tlpsrc/00texlive.installation.tlpsrc @@ -40,6 +40,7 @@ longdesc are never split into .src and .doc sub-packages in the tlpdb. depend opt_paper:a4 depend opt_path:0 +depend opt_adjustrepo:1 depend opt_write18_restricted:1 # if we want to make a dist frozen uncomment that and tlmgr will bail out |