summaryrefslogtreecommitdiff
path: root/Master/install-tl
diff options
context:
space:
mode:
Diffstat (limited to 'Master/install-tl')
-rwxr-xr-xMaster/install-tl23
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