summaryrefslogtreecommitdiff
path: root/Master/texmf/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf/scripts')
-rwxr-xr-xMaster/texmf/scripts/texlive/tlmgr.pl55
1 files changed, 53 insertions, 2 deletions
diff --git a/Master/texmf/scripts/texlive/tlmgr.pl b/Master/texmf/scripts/texlive/tlmgr.pl
index 44c42752cca..e12f4807afc 100755
--- a/Master/texmf/scripts/texlive/tlmgr.pl
+++ b/Master/texmf/scripts/texlive/tlmgr.pl
@@ -1587,7 +1587,20 @@ sub action_update {
# install all the new packages first
+ my @new_packs;
+ my @new_colls;
+ my @new_schemes;
for my $pkg (sort @new) {
+ # we do name checking here, not to load all tlpobj again and again
+ if ($pkg =~ m/^scheme-/) {
+ push @new_schemes, $pkg;
+ } elsif ($pkg =~ m/^collection-/) {
+ push @new_colls, $pkg;
+ } else {
+ push @new_packs, $pkg;
+ }
+ }
+ for my $pkg (@new_packs, @new_colls, @new_schemes) {
# install new packages
my $mediatlp = $tlmediatlpdb->get_package($pkg);
if (!defined($mediatlp)) {
@@ -1612,7 +1625,27 @@ sub action_update {
}
#
- foreach my $pkg (sort @updated) {
+ # update order of packages:
+ # first all normal packages, then collections, then schemes
+ # this way if installation breaks off and a new package in a collection
+ # isn't already installed, but the collection already updated, it will
+ # be reported as forcibly removed.
+ my @inst_packs;
+ my @inst_colls;
+ my @inst_schemes;
+ for my $pkg (sort @updated) {
+ # we do name checking here, not to load all tlpobj again and again
+ if ($pkg =~ m/^scheme-/) {
+ push @inst_schemes, $pkg;
+ } elsif ($pkg =~ m/^collection-/) {
+ push @inst_colls, $pkg;
+ } else {
+ push @inst_packs, $pkg;
+ }
+ }
+
+ #
+ foreach my $pkg (@inst_packs, @inst_colls, @inst_schemes) {
next if ($pkg =~ m/^00texlive/);
my $tlp = $localtlpdb->get_package($pkg);
# we checked already that this package is present!
@@ -1808,7 +1841,25 @@ sub action_install {
} else {
@packs = $tlmediatlpdb->expand_dependencies($localtlpdb, @packs) unless $opts{"no-depends"};
}
- foreach my $pkg (sort @packs) {
+ #
+ # installation order of packages:
+ # first all normal packages, then collections, then schemes
+ # isn't already installed, but the collection already updated, it will
+ # be reported as forcibly removed.
+ my @inst_packs;
+ my @inst_colls;
+ my @inst_schemes;
+ for my $pkg (sort @packs) {
+ # we do name checking here, not to load all tlpobj again and again
+ if ($pkg =~ m/^scheme-/) {
+ push @inst_schemes, $pkg;
+ } elsif ($pkg =~ m/^collection-/) {
+ push @inst_colls, $pkg;
+ } else {
+ push @inst_packs, $pkg;
+ }
+ }
+ foreach my $pkg (@inst_packs, @inst_colls, @inst_schemes) {
my $re = "";
if (defined($localtlpdb->get_package($pkg))) {
if ($opts{"reinstall"}) {