summaryrefslogtreecommitdiff
path: root/Master/tlpkg
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2022-02-14 06:44:19 +0000
committerNorbert Preining <preining@logic.at>2022-02-14 06:44:19 +0000
commit92d4bbc3da7cdbfd620e1e4b7bdc9823e1e6f91c (patch)
tree3bbfac6464dc3be98b565b8e6f9696fc47256002 /Master/tlpkg
parent081a18380b9a8d620d2077126008912608650a34 (diff)
More resilient installation
split installation of packages into two stages: first those which are absolutely necessary for the installation process to continue (fmtutil, updmap, tlmgr, ...), and those which are just normal packages which can be installed afterwards for fixing. For now, the option --continue needs to be passed. git-svn-id: svn://tug.org/texlive/trunk@62016 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg')
-rw-r--r--Master/tlpkg/TeXLive/TLUtils.pm16
1 files changed, 12 insertions, 4 deletions
diff --git a/Master/tlpkg/TeXLive/TLUtils.pm b/Master/tlpkg/TeXLive/TLUtils.pm
index 675a5463385..2cd96368c4a 100644
--- a/Master/tlpkg/TeXLive/TLUtils.pm
+++ b/Master/tlpkg/TeXLive/TLUtils.pm
@@ -73,7 +73,7 @@ C<TeXLive::TLUtils> - TeX Live infrastructure miscellany
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)>);
+ TeXLive::TLUtils::install_packages($from_tlpdb,$media,$to_tlpdb,$what,$opt_src, $opt_doc, $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 @@ sub time_estimate {
}
-=item C<install_packages($from_tlpdb, $media, $to_tlpdb, $what, $opt_src, $opt_doc)>
+=item C<install_packages($from_tlpdb, $media, $to_tlpdb, $what, $opt_src, $opt_doc, $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,12 +1588,15 @@ the TLPDB C<$from_tlpdb>.
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<$continue> is trueish, installation failure of non-critical packages
+will be ignored.
+
Returns 1 on success and 0 on error.
=cut
sub install_packages {
- my ($fromtlpdb,$media,$totlpdb,$what,$opt_src,$opt_doc) = @_;
+ my ($fromtlpdb,$media,$totlpdb,$what,$opt_src,$opt_doc, $opt_continue) = @_;
my $container_src_split = $fromtlpdb->config_src_container;
my $container_doc_split = $fromtlpdb->config_doc_container;
my $root = $fromtlpdb->root;
@@ -1670,7 +1673,12 @@ sub install_packages {
info("$infostr\n");
# return false if download failed again
if (!$fromtlpdb->install_package($package, $totlpdb)) {
- return 0;
+ if ($opt_continue) {
+ push @::installation_failed_packages, $package;
+ tlwarn("Failed to install $package, but continue anyway!\n");
+ } else {
+ return 0;
+ }
}
$donesize += $tlpsizes{$package};
}