summaryrefslogtreecommitdiff
path: root/Master/texmf
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2010-04-05 16:05:32 +0000
committerNorbert Preining <preining@logic.at>2010-04-05 16:05:32 +0000
commite93b325e78432093af9e0b587eb316157b899af2 (patch)
treef3719dc0e291358b4ad4df76c9abe1234d700c4f /Master/texmf
parent81f2d0cd426d10307847ec108df8df2ac6f542b2 (diff)
fix handling of forcibly removed collections so that packages contained
in those collections are not auto-installed git-svn-id: svn://tug.org/texlive/trunk@17714 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf')
-rw-r--r--Master/texmf/scripts/texlive/NEWS2
-rwxr-xr-xMaster/texmf/scripts/texlive/tlmgr.pl46
2 files changed, 46 insertions, 2 deletions
diff --git a/Master/texmf/scripts/texlive/NEWS b/Master/texmf/scripts/texlive/NEWS
index 21dd36b2a6a..2c884c5ddd4 100644
--- a/Master/texmf/scripts/texlive/NEWS
+++ b/Master/texmf/scripts/texlive/NEWS
@@ -4,6 +4,8 @@ release tlmgr rev ????? (????-??-??)
* support tlmgr restore --all: restoring from all available backups the
latest one
* GUI: add support for restore action
+ * fix handling of forcibly removed collections so that packages contained
+ in those collections are not auto-installed
release tlmgr rev 17611 (2010-03-30)
diff --git a/Master/texmf/scripts/texlive/tlmgr.pl b/Master/texmf/scripts/texlive/tlmgr.pl
index c64f7e01da5..198fd8c0fc0 100755
--- a/Master/texmf/scripts/texlive/tlmgr.pl
+++ b/Master/texmf/scripts/texlive/tlmgr.pl
@@ -1634,6 +1634,7 @@ sub auto_remove_install_force_packages {
my %removals_full;
my %forcermpkgs_full;
my %newpkgs_full;
+ my %new_pkgs_due_forcerm_coll;
# check for new/removed/forcibly removed packages.
# we start from the list of installed collections in the local tlpdb
# which are also present in the remote database
@@ -1669,6 +1670,41 @@ sub auto_remove_install_force_packages {
for my $p (@remoteexpansion_full) {
delete($removals_full{$p});
}
+ # in a first round we check only for forcibly removed collections
+ # this is necessary to NOT declare a package that is contained
+ # in a forcibly removed collections as auto-install since it appears
+ # in the @remoteexpansion_full, but not in @localexpansion_full.
+ for my $p (@localexpansion_full) {
+ # intersection, don't check A\B and B\A
+ next if $newpkgs_full{$p};
+ next if $removals_full{$p};
+ next if ($tlmediatlpdb->get_package($p)->category ne "Collection");
+ my $tlp = $localtlpdb->get_package($p);
+ if (!defined($tlp)) {
+ if ($opts{"reinstall-forcibly-removed"}) {
+ $newpkgs_full{$p} = 1;
+ } else {
+ $forcermpkgs_full{$p} = 1;
+ }
+ }
+ }
+ # now we have in %forcermpkgs_full only collections that have been
+ # forcibly removed. Again, expand those against the remote tlpdb
+ # and remove the expanded packages from the list of localexpansion.
+ my @pkgs_from_forcerm_colls =
+ $tlmediatlpdb->expand_dependencies($localtlpdb, keys %forcermpkgs_full);
+ #
+ # the package in @pkgs_from_forcerm_colls would be auto-installed, so
+ # check for that:
+ for my $p (keys %newpkgs_full) {
+ if (member($p, @pkgs_from_forcerm_colls)) {
+ delete $newpkgs_full{$p};
+ $new_pkgs_due_forcerm_coll{$p} = 1;
+ }
+ }
+ #
+ # now create the final list of forcerm packages by checking against
+ # all packages
for my $p (@localexpansion_full) {
# intersection, don't check A\B and B\A
next if $newpkgs_full{$p};
@@ -1699,7 +1735,7 @@ sub auto_remove_install_force_packages {
debug ("tlmgr: deleted : " . join("\n\t",keys %removals) . "\n");
debug ("tlmgr: forced : " . join("\n\t",keys %forcermpkgs) . "\n");
- return (\%removals, \%newpkgs, \%forcermpkgs);
+ return (\%removals, \%newpkgs, \%forcermpkgs, \%new_pkgs_due_forcerm_coll);
}
# tlmgr update foo
@@ -1888,10 +1924,12 @@ sub action_update {
unless $opts{"list"};
}
- my ($remref, $newref, $forref) = auto_remove_install_force_packages(@todo);
+ my ($remref, $newref, $forref, $new_due_to_forcerm_coll_ref) =
+ auto_remove_install_force_packages(@todo);
my %removals = %$remref;
my %forcermpkgs = %$forref;
my %newpkgs = %$newref;
+ my %new_due_to_forcerm_coll = %$new_due_to_forcerm_coll_ref;
# check that the --exclude options do not conflict with the
# options --no-auto-remove, --no-auto-install, --reinstall-forcibly-removed
@@ -1978,6 +2016,10 @@ sub action_update {
# skipping this package, it has been removed due to server removal
# and has already been removed
next;
+ } elsif (defined($new_due_to_forcerm_coll{$pkg})) {
+ debug("tlmgr: $pkg seems to be contained in a forcibly removed" .
+ " collection, not auto-installing it!\n");
+ next;
} else {
tlwarn("\ntlmgr: $pkg mentioned, but neither new nor forcibly removed\n");
next;