diff options
author | Karl Berry <karl@freefriends.org> | 2015-01-08 18:11:34 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2015-01-08 18:11:34 +0000 |
commit | 29089c2defb94b1622f47450560ecd655314c082 (patch) | |
tree | 78e31bf46b5b4a5449d839b34a280a5eec21f21e /Master | |
parent | f6575b3738f08bcaef92d107d98c990f219477cd (diff) |
tlmgr install: report explicitly-requested packages already installed
git-svn-id: svn://tug.org/texlive/trunk@35997 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r-- | Master/texmf-dist/scripts/texlive/NEWS | 1 | ||||
-rwxr-xr-x | Master/texmf-dist/scripts/texlive/tlmgr.pl | 51 |
2 files changed, 32 insertions, 20 deletions
diff --git a/Master/texmf-dist/scripts/texlive/NEWS b/Master/texmf-dist/scripts/texlive/NEWS index 33956b9010d..2e1e57507bc 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>install action reports explicitly-requested packages already installed. <li>make restore --dry-run more of a no-op, as intended. <p><b>tlmgr revision 35841 (released 24dec14):</b> diff --git a/Master/texmf-dist/scripts/texlive/tlmgr.pl b/Master/texmf-dist/scripts/texlive/tlmgr.pl index 5d06281eaa1..b9fc8113832 100755 --- a/Master/texmf-dist/scripts/texlive/tlmgr.pl +++ b/Master/texmf-dist/scripts/texlive/tlmgr.pl @@ -888,7 +888,7 @@ sub action_remove { my @more_removal; init_local_db(); return if !check_on_writable(); - info("remove: dry run, no changes will be made\n") if $opts{"dry-run"}; + info("$prg remove: dry run, no changes will be made\n") if $opts{"dry-run"}; my @packs = @ARGV; # # we have to be carefull not to remove too many packages. The idea is @@ -1595,7 +1595,7 @@ sub action_restore { exit 1; } } - info("restore: dry run, no changes will be made\n") if $opts{"dry-run"}; + info("$prg 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); @@ -2233,7 +2233,7 @@ sub action_update { } init_tlmedia_or_die(); - info("update: dry run, no changes will be made\n") if $opts{"dry-run"}; + info("$prg update: dry run, no changes will be made\n") if $opts{"dry-run"}; my @excluded_pkgs = (); if ($opts{"exclude"}) { @@ -2340,7 +2340,7 @@ sub action_update { } else { @todo = @ARGV; } - # don't do anything if we have been invoced in a strange way + # don't do anything if we have been invoked in a strange way if (!@todo) { if ($opts{"self"}) { info("$prg: no updates for tlmgr present.\n"); @@ -3223,7 +3223,6 @@ sub action_install { init_local_db(1); return if !check_on_writable(); - # # installation from a .tar.xz if ($opts{"file"}) { return $localtlpdb->install_package_files(@ARGV); @@ -3245,25 +3244,29 @@ sub action_install { # return here and don't do any updates return; } else { - die "$prg: Not continuing, please see warning above!\n"; + die "$prg: Terminating; please see warning above!\n"; } } } } - $opts{"no-depends"} = 1 if $opts{"no-depends-at-all"}; - info("install: dry run, no changes will be made\n") if $opts{"dry-run"}; + info("$prg install: dry run, no changes will be made\n") if $opts{"dry-run"}; my @packs = @ARGV; # first expand the .ARCH dependencies unless $opts{"no-depends-at-all"} - @packs = $remotetlpdb->expand_dependencies("-only-arch", $localtlpdb, @ARGV) unless $opts{"no-depends-at-all"}; - # now expand all others unless $opts{"no-depends"} - # if $opts{"reinstall"} do not collection->collection dependencies - if ($opts{"reinstall"} || $opts{"usermode"}) { - @packs = $remotetlpdb->expand_dependencies("-no-collections", $localtlpdb, @packs) unless $opts{"no-depends"}; - } else { - @packs = $remotetlpdb->expand_dependencies($localtlpdb, @packs) unless $opts{"no-depends"}; + @packs = $remotetlpdb->expand_dependencies("-only-arch", $localtlpdb, @ARGV) + unless $opts{"no-depends-at-all"}; + # + # if no-depends, we're done; else get rest of deps. + unless ($opts{"no-depends"}) { + if ($opts{"reinstall"} || $opts{"usermode"}) { + # if reinstall or usermode, omit collection->collection deps + @packs = $remotetlpdb->expand_dependencies("-no-collections", + $localtlpdb, @packs); + } else { + @packs = $remotetlpdb->expand_dependencies($localtlpdb, @packs); + } } # # expand dependencies returns a list pkg@tag in case of a virtual @@ -3306,7 +3309,7 @@ sub action_install { my $mediatlp = $remotetlpdb->get_package($pkg, ($packs{$pkg} ? $packs{$pkg} : undef)); if (!defined($mediatlp)) { - tlwarn("package $pkg not present in package repository.\n"); + tlwarn("$prg install: package $pkg not present in repository.\n"); next; } if (defined($localtlpdb->get_package($pkg))) { @@ -3315,12 +3318,16 @@ sub action_install { $revs{$pkg} = $mediatlp->revision; push @todo, $pkg; } else { + # debug msg that we have this one. debug("already installed: $pkg\n"); + # if explicitly requested by user (not a dep), tell them. + info("$prg install: package already present: $pkg\n") + if grep { $_ eq $pkg } @ARGV; } } else { $totalnr++; $revs{$pkg} = $mediatlp->revision; - push @todo, $pkg; + push (@todo, $pkg); } } # return if there is nothing to install! @@ -4018,7 +4025,7 @@ sub action_platform { } my $what = shift @ARGV; init_local_db(1); - info("platform: dry run, no changes will be made\n") if $opts{"dry-run"}; + info("$prg platform: dry run, no changes will be made\n") if $opts{"dry-run"}; $what || ($what = "list"); if ($what =~ m/^list$/i) { # list the available platforms @@ -6454,8 +6461,12 @@ with C<--usertree>. See L<USER MODE> below. =head2 install [I<option>]... I<pkg>... -Install each I<pkg> given on the command line. By default this installs -all packages on which the given I<pkg>s are dependent, also. Options: +Install each I<pkg> given on the command line, if it is not already +installed. (It does not touch existing packages; see the C<update> +action for how to get the latest version of a package.) + +By default this also installs all packages on which the given I<pkg>s are +dependent. Options: =over 4 |