summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2008-10-16 23:34:10 +0000
committerKarl Berry <karl@freefriends.org>2008-10-16 23:34:10 +0000
commit8ecd07ed332dbd3cd8cdfc02f03137b19b9b8f4a (patch)
tree2a04c1d3711a95edd9ad2ebee4edd963c6726995 /Master
parent5b1c4de308a21dfddfd69aa011893faa30c2c192 (diff)
(action_update); try not to complain about
foo.ARCH when foo has been forcibly removed. git-svn-id: svn://tug.org/texlive/trunk@10990 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rwxr-xr-xMaster/texmf/scripts/texlive/tlmgr.pl40
1 files changed, 25 insertions, 15 deletions
diff --git a/Master/texmf/scripts/texlive/tlmgr.pl b/Master/texmf/scripts/texlive/tlmgr.pl
index c7781fb134e..64e7439d63d 100755
--- a/Master/texmf/scripts/texlive/tlmgr.pl
+++ b/Master/texmf/scripts/texlive/tlmgr.pl
@@ -23,7 +23,7 @@
# tlmgr fileassoc pdf psv
# tlmgr fileassoc ps psv
# only setting is possible
-# Not really necessary?!!
+# Not really necessary?
# - ordering or collections removal (see below for details)
# - (?) removal does not remove created format files from TEXMFSYSVAR
# - after install/update show the number of bytes transfered
@@ -409,7 +409,7 @@ sub remove_package {
# will remove the packages foo bar baz itself
# and will remove all .ARCH dependencies, too
# and if some of them are collections it will also remove the
-# depending packs which are NOT Collections|Schemes!!!
+# depending packages which are NOT Collections|Schemes.
# if some of them are referenced somewhere they will not be removed
# unless --force given
#
@@ -873,7 +873,7 @@ sub close_win32_updater {
# will absolutely only update foo not even taking .ARCH into account
#
# TLMedia->install_package does ONLY INSTALL ONE PACKAGE, no deps whatsoever
-# anymore!!!! That has all to be done by hand.
+# anymore. That has all to be done by hand.
sub action_update {
if ($opt_gui) {
action_gui("update");
@@ -984,15 +984,15 @@ sub action_update {
debug("collection $c has disappeared from the network!\n");
} else {
# take all the dependencies of the installed collection
- # *as*found* in the network tlpdb
+ # as found in the network tlpdb
for my $d ($tlc->depends) {
my $tlp = $localtlpdb->get_package($d);
if (!defined($tlp)) {
# here we have two cases:
# 1) the packages is already mentioned in the local tlpdb, in this
- # case it was forcibly removed and we do NOT reinstall it!
+ # case it was forcibly removed and we do not reinstall it;
# 2) it is not mentioned, then it is really a new package and will
- # be auto installed
+ # be auto installed.
if (grep(/^$d$/, @localtlcdeps)) {
$forcermpkgs{$d} = "$c";
} else {
@@ -1006,20 +1006,30 @@ sub action_update {
tlwarn ("tlmgr update: please specify a list of packages or --all.\n");
}
# update all .ARCH dependencies, too, unless $opt_reallynodepends
- @todo = $mediatlpdb->expand_dependencies("-only-arch", $localtlpdb, @todo) unless $opt_reallynodepends;
+ @todo = $mediatlpdb->expand_dependencies("-only-arch", $localtlpdb, @todo)
+ unless $opt_reallynodepends;
# update deps unless $opt_nodepends
- @todo = $mediatlpdb->expand_dependencies("-no-collections", $localtlpdb, @todo) unless $opt_nodepends;
+ @todo = $mediatlpdb->expand_dependencies("-no-collections",$localtlpdb,@todo)
+ unless $opt_nodepends;
+
foreach my $pkg (sort @todo) {
next if ($pkg =~ m/^00texlive/);
my $tlp = $localtlpdb->get_package($pkg);
if (!defined($tlp)) {
- if ($forcermpkgs{$pkg}) {
- info("skipping forcibly removed package $pkg ($forcermpkgs{$pkg})\n");
+ # if the user has forcibly removed (say) bin-makeindex, then the
+ # loop above has no way to add bin-makeindex.ARCH into the
+ # %forcermpkgs hash, but the .ARCH will still be in the dependency
+ # expansion. So try both with and without the .ARCH extension.
+ (my $pkg_noarch = $pkg) =~ s/\.[^.]*$//;
+ my $forcerm_coll = $forcermpkgs{$pkg} || $forcermpkgs{$pkg_noarch};
+ if ($forcerm_coll) {
+ info("skipping forcibly removed package $pkg ($forcerm_coll)\n");
next;
} elsif ($newpkgs{$pkg}) {
# do nothing here, it will be reported below!
} else {
- tlwarn("\nShould not happen, please report: $pkg mentioned, but neither new nor forcibly removed\n");
+ tlwarn("\nShould not happen, please report: "
+ . "$pkg mentioned, but neither new nor forcibly removed\n");
next;
}
# install new packages
@@ -1103,9 +1113,9 @@ sub action_update {
logpackage("update: $pkg ($rev -> $mediarev)");
unlink($unwind_package) if $remove_unwind_container;
} else {
- # install_package returned a scalare, so error!
+ # install_package returned a scalar, so error.
# now in fact we should do some cleanup, removing files and
- # dirs from the new package before re-installing the old one!!!
+ # dirs from the new package before re-installing the old one.
# TODO
logpackage("failed update: $pkg ($rev -> $mediarev)");
tlwarn("\n\nInstallation of new version of $pkg did fail, trying to unwind!\n");
@@ -1167,7 +1177,7 @@ sub action_update {
#
# tlmgr install --no-depends foo bar baz
# will *only* install these three packages (if they are not already installed
-# but it will STILL INSTALL foo.ARCH if they are necessary!!
+# but it will STILL INSTALL foo.ARCH if they are necessary.
#
# tlmgr install --no-depends-at-all foo bar baz
# will absolutely only install these three packages, and will not even
@@ -1185,7 +1195,7 @@ sub action_update {
# not (that is the --reinstall)
#
# TLMedia->install_package does ONLY INSTALL ONE PACKAGE, no deps whatsoever
-# anymore!!!! That has all to be done by hand.
+# anymore! That has all to be done by hand.
sub action_install {
if ($opt_gui) {
action_gui("install");