summaryrefslogtreecommitdiff
path: root/Master/texmf
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2008-09-25 09:25:27 +0000
committerNorbert Preining <preining@logic.at>2008-09-25 09:25:27 +0000
commitad83f996533ec986614a8bf54ad92175d0880380 (patch)
tree533873619732e910fb1f4c6144c488cf03180549 /Master/texmf
parent24a0f857866568c51ba0d9e440e118b33c122451 (diff)
tlmgr: action_update: make --dry-run output the same as the real update
if there are no errors. Only the post install actions are not done. git-svn-id: svn://tug.org/texlive/trunk@10725 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf')
-rwxr-xr-xMaster/texmf/scripts/texlive/tlmgr.pl12
1 files changed, 8 insertions, 4 deletions
diff --git a/Master/texmf/scripts/texlive/tlmgr.pl b/Master/texmf/scripts/texlive/tlmgr.pl
index 259a8253976..b095ce747e7 100755
--- a/Master/texmf/scripts/texlive/tlmgr.pl
+++ b/Master/texmf/scripts/texlive/tlmgr.pl
@@ -686,7 +686,7 @@ sub action_update {
next if ($pkg =~ m/^00texlive/);
my $tlp = $localtlpdb->get_package($pkg);
if (!defined($tlp)) {
- printf STDERR "$0: $pkg not installed locally\n";
+ tlwarn("$0: $pkg not installed locally\n");
next;
}
my $unwind_package;
@@ -702,13 +702,11 @@ sub action_update {
$nrupdated++;
if ($opt_list) {
print "$pkg: local: $rev, source: $mediarev\n";
- } elsif ($opt_dry) {
- print "Installing $pkg\n";
} else {
# first remove the package, then reinstall it
# this way we get rid of useless files
# force the deinstallation since we will reinstall it
- if ($opt_backupdir) {
+ if ($opt_backupdir && !$opt_dry) {
$opt_backupdir = abs_path($opt_backupdir);
if (! -d $opt_backupdir) {
printf STDERR "backupdir argument must be an existing directory!\n";
@@ -720,6 +718,8 @@ sub action_update {
}
}
if (win32() && ($pkg =~ m/$WinSpecialUpdatePackagesRegexp/)) {
+ # that could be more intelligent for decent $opt_dry output
+ next if $opt_dry;
if (!$updater_started) {
open UPDATER, ">" . $root . "/tlpkg/installer/updater.bat"
or die "Cannot create updater.bat: $!";
@@ -771,6 +771,10 @@ EOF
}
} else {
info("update: $pkg ($rev -> $mediarev) ... ");
+ if ($opt_dry) {
+ info("done\n");
+ next;
+ }
if (!$unwind_package) {
# no backup was made, so let us create a temporary .tar file
# of the package