summaryrefslogtreecommitdiff
path: root/Master/texmf
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2009-06-10 16:39:46 +0000
committerNorbert Preining <preining@logic.at>2009-06-10 16:39:46 +0000
commit72013e5a284ed21f86df3ec4879d67b31bf4602f (patch)
treec0ee13385769871c7bf5623ee3410082f387be8e /Master/texmf
parenta00f3c99d1e95e9353d652384e4010bf154579f5 (diff)
install and update packages in the order: 1. packages, 2. collections,
3. schemes. That way if update crashes and the collection is already updated and new package not installed, it will not be reported as "forcibly removed". git-svn-id: svn://tug.org/texlive/trunk@13700 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf')
-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"}) {