texlive[62112] Master: install-tl: add --debug-fakenet

commits+preining at tug.org commits+preining at tug.org
Sun Feb 20 23:57:45 CET 2022


Revision: 62112
          http://tug.org/svn/texlive?view=revision&revision=62112
Author:   preining
Date:     2022-02-20 23:57:45 +0100 (Sun, 20 Feb 2022)
Log Message:
-----------
install-tl: add --debug-fakenet

Modified Paths:
--------------
    trunk/Master/install-tl
    trunk/Master/tlpkg/TeXLive/TLUtils.pm

Modified: trunk/Master/install-tl
===================================================================
--- trunk/Master/install-tl	2022-02-20 22:57:37 UTC (rev 62111)
+++ trunk/Master/install-tl	2022-02-20 22:57:45 UTC (rev 62112)
@@ -305,6 +305,8 @@
 our $opt_in_place = 0;
 # don't set this to a value, see below
 my $opt_verify_downloads;
+# debug options
+my $opt_debug_fakenet = 0;
 
 # show all options even those not relevant for that arch
 $::opt_all_options = 0;
@@ -369,6 +371,7 @@
            "continue"                    => \$opt_continue,
            "custom-bin=s"                => \$opt_custom_bin,
            "debug-translation"           => \$::debug_translation,
+           "debug-fakenet"               => \$opt_debug_fakenet,
            "fancyselector",
            "force-platform|force-arch=s" => \$opt_force_arch,
            "gui:s"                       => \$opt_gui,
@@ -2153,6 +2156,8 @@
   }
   @criticalwhat = sort @criticalwhat;
   @what = sort @what;
+  # determine retrial behavior
+  my $retry = $opt_debug_fakenet || ($media eq "NET");
   # temporary unset the localtlpdb options responsible for
   # running all kind of postactions, since install_packages
   # would call them without the PATH already set up
@@ -2163,12 +2168,12 @@
   if (!install_packages($tlpdb,$media,$localtlpdb,\@criticalwhat,
                         $vars{'tlpdbopt_install_srcfiles'},
                         $vars{'tlpdbopt_install_docfiles'},
-                        0)
+                        $retry, 0)
       ||
       !install_packages($tlpdb,$media,$localtlpdb,\@what,
                         $vars{'tlpdbopt_install_srcfiles'},
                         $vars{'tlpdbopt_install_docfiles'},
-                        $opt_continue)) {
+                        $retry, $opt_continue)) {
     my $profile_name = "installation.profile";
     create_profile($profile_name);
     tlwarn("Installation failed.\n");

Modified: trunk/Master/tlpkg/TeXLive/TLUtils.pm
===================================================================
--- trunk/Master/tlpkg/TeXLive/TLUtils.pm	2022-02-20 22:57:37 UTC (rev 62111)
+++ trunk/Master/tlpkg/TeXLive/TLUtils.pm	2022-02-20 22:57:45 UTC (rev 62112)
@@ -73,7 +73,7 @@
   TeXLive::TLUtils::create_language_def($tlpdb,$dest,$localconf);
   TeXLive::TLUtils::create_language_lua($tlpdb,$dest,$localconf);
   TeXLive::TLUtils::time_estimate($totalsize, $donesize, $starttime)
-  TeXLive::TLUtils::install_packages($from_tlpdb,$media,$to_tlpdb,$what,$opt_src, $opt_doc, $continue);
+  TeXLive::TLUtils::install_packages($from_tlpdb,$media,$to_tlpdb,$what,$opt_src, $opt_doc, $retry, $continue);
   TeXLive::TLUtils::do_postaction($how, $tlpobj, $do_fileassocs, $do_menu, $do_desktop, $do_script);
   TeXLive::TLUtils::announce_execute_actions($how, @executes, $what);
   TeXLive::TLUtils::add_symlinks($root, $arch, $sys_bin, $sys_man, $sys_info);
@@ -1579,7 +1579,7 @@
 }
 
 
-=item C<install_packages($from_tlpdb, $media, $to_tlpdb, $what, $opt_src, $opt_doc, $continue)>
+=item C<install_packages($from_tlpdb, $media, $to_tlpdb, $what, $opt_src, $opt_doc, $retry, $continue)>
 
 Installs the list of packages found in C<@$what> (a ref to a list) into
 the TLPDB given by C<$to_tlpdb>. Information on files are taken from
@@ -1588,6 +1588,8 @@
 C<$opt_src> and C<$opt_doc> specify whether srcfiles and docfiles should be
 installed (currently implemented only for installation from uncompressed media).
 
+If C<$retry> is trueish, retry failed packages a second time.
+
 If C<$continue> is trueish, installation failure of non-critical packages
 will be ignored.
 
@@ -1596,7 +1598,7 @@
 =cut
 
 sub install_packages {
-  my ($fromtlpdb,$media,$totlpdb,$what,$opt_src,$opt_doc, $opt_continue) = @_;
+  my ($fromtlpdb,$media,$totlpdb,$what,$opt_src,$opt_doc, $opt_retry, $opt_continue) = @_;
   my $container_src_split = $fromtlpdb->config_src_container;
   my $container_doc_split = $fromtlpdb->config_doc_container;
   my $root = $fromtlpdb->root;
@@ -1654,7 +1656,7 @@
     # (and not installing from disk).
     if (!$fromtlpdb->install_package($package, $totlpdb)) {
       tlwarn("TLUtils::install_packages: Failed to install $package\n");
-      if ($media eq "NET") {
+      if ($opt_retry) {
         tlwarn("                           $package will be retried later.\n");
         push @packs_again, $package;
       } else {



More information about the tex-live-commits mailing list.