diff options
author | Karl Berry <karl@freefriends.org> | 2019-10-17 22:32:30 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2019-10-17 22:32:30 +0000 |
commit | 8de64f4ef4f2f8dfe60394b1aacc289c482fd5a9 (patch) | |
tree | 53485b828a218d883e57ccf2198624b1026a69e2 /Master/install-tl | |
parent | cbfef30b39308323ed930fcca76d6f531e122668 (diff) |
(do_install_packages): install critical packages
first via sort subroutine.
git-svn-id: svn://tug.org/texlive/trunk@52423 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/install-tl')
-rwxr-xr-x | Master/install-tl | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/Master/install-tl b/Master/install-tl index 6f363c0cff0..8cbaf6675e9 100755 --- a/Master/install-tl +++ b/Master/install-tl @@ -2125,13 +2125,22 @@ sub read_profile { sub do_install_packages { # let's install the critical packages first, since they are the most - # likely to fail, and nothing is usable without them. - my @what = @TeXLive::TLConfig::CriticalPackagesList; - foreach my $package (sort keys %install) { - if ($install{$package} == 1 - && $package !~ m/$CriticalPackagesRegexp/) { - push (@what, $package) - } + # likely to fail (so let's fail early), and nothing is usable without them. + my @what = (); + foreach my $package (sort { + if ($a =~ /$CriticalPackagesRegexp/) { + if ($b =~ /$CriticalPackagesRegexp/) { + return $a cmp $b; # both critical + } else { + return -1; # critical before non-critical + } + } elsif ($b =~ /$CriticalPackagesRegexp/) { + return 1; # critical before non-critical + } else { + return $a cmp $b; + } + } keys %install) { + push (@what, $package) if ($install{$package} == 1); } # temporary unset the localtlpdb options responsible for # running all kind of postactions, since install_packages |