diff options
author | Karl Berry <karl@freefriends.org> | 2015-01-08 17:38:23 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2015-01-08 17:38:23 +0000 |
commit | f6575b3738f08bcaef92d107d98c990f219477cd (patch) | |
tree | d4e93ce3170e537c61b18e03fa2e8316ecde8d32 /Master/texmf-dist/scripts | |
parent | b7425591a7f97a224c92f5a1773d14f392f0339e (diff) |
(action_restore): check opts{dry-run}, not just dry
git-svn-id: svn://tug.org/texlive/trunk@35996 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/scripts')
-rw-r--r-- | Master/texmf-dist/scripts/texlive/NEWS | 1 | ||||
-rwxr-xr-x | Master/texmf-dist/scripts/texlive/tlmgr.pl | 20 |
2 files changed, 10 insertions, 11 deletions
diff --git a/Master/texmf-dist/scripts/texlive/NEWS b/Master/texmf-dist/scripts/texlive/NEWS index d99e61f420f..33956b9010d 100644 --- a/Master/texmf-dist/scripts/texlive/NEWS +++ b/Master/texmf-dist/scripts/texlive/NEWS @@ -4,6 +4,7 @@ Karl Berry, 2010.) <li>add --with-doc and --with-src options for use with install --reinstall, to get the doc and/or src files even if they were omitted at initial installation. +<li>make restore --dry-run more of a no-op, as intended. <p><b>tlmgr revision 35841 (released 24dec14):</b> <li>remove taxonomy searching, since upstream data is no longer maintained. diff --git a/Master/texmf-dist/scripts/texlive/tlmgr.pl b/Master/texmf-dist/scripts/texlive/tlmgr.pl index 77230c6c798..5d06281eaa1 100755 --- a/Master/texmf-dist/scripts/texlive/tlmgr.pl +++ b/Master/texmf-dist/scripts/texlive/tlmgr.pl @@ -1595,7 +1595,7 @@ sub action_restore { exit 1; } } - info("restore: dry run, no changes will be made\n") if $opts{"dry"}; + info("restore: dry run, no changes will be made\n") if $opts{"dry-run"}; # initialize the hash(packages) of hash(revisions), do stat files! (the 1) my %backups = get_available_backups($opts{"backupdir"}, 1); @@ -1620,7 +1620,7 @@ sub action_restore { my @tmp = sort {$b <=> $a} (keys %{$backups{$p}}); my $rev = $tmp[0]; print "Restoring $p, $rev from $opts{'backupdir'}/${p}.r${rev}.tar.xz\n"; - if (!$opts{"dry"}) { + if (!$opts{"dry-run"}) { # first remove the package, then reinstall it # this way we get rid of useless files restore_one_package($p, $rev, $opts{"backupdir"}); @@ -1681,7 +1681,7 @@ sub action_restore { } } print "Restoring $pkg, $rev from $opts{'backupdir'}/${pkg}.r${rev}.tar.xz\n"; - if (!$opts{"dry"}) { + if (!$opts{"dry-run"}) { init_local_db(1); # first remove the package, then reinstall it # this way we get rid of useless files @@ -6778,17 +6778,15 @@ Restore a package from a previously-made backup. If C<--all> is given, try to restore the latest revision of all package backups found in the backup directory. -Otherwise, if neither I<pkg> nor I<rev> are given, list the available backup -revisions for all packages. - -With I<pkg> given but no I<rev>, list all available backup revisions of -I<pkg>. +Otherwise, if neither I<pkg> nor I<rev> are given, list the available +backup revisions for all packages. With I<pkg> given but no I<rev>, +list all available backup revisions of I<pkg>. -When listing available packages tlmgr shows the revision and in +When listing available packages tlmgr shows the revision, and in parenthesis the creation time if available (in format yyyy-mm-dd hh:mm). -With both I<pkg> and I<rev>, tries to restore the package from the -specified backup. +If (and only if) both I<pkg> and a valid revision number I<rev> are +specified, try to restore the package from the specified backup. Options: |