diff options
author | Karl Berry <karl@freefriends.org> | 2011-06-18 00:09:42 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2011-06-18 00:09:42 +0000 |
commit | 76b7a41cefbf7fed421b6ddf746859c4c1d9ebe2 (patch) | |
tree | a477741b18b587f5b24746343ad8fd6317bbb647 /Master | |
parent | 0177c4eac3a7297d360b1625f0776b1d3e908e7a (diff) |
(action_dumptlpdb): force exactly one of --local
and --remote; always restore $::machinereadable; update doc.
git-svn-id: svn://tug.org/texlive/trunk@23036 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rwxr-xr-x | Master/texmf/scripts/texlive/tlmgr.pl | 72 |
1 files changed, 40 insertions, 32 deletions
diff --git a/Master/texmf/scripts/texlive/tlmgr.pl b/Master/texmf/scripts/texlive/tlmgr.pl index dc2603b9f77..2cb13c9acf7 100755 --- a/Master/texmf/scripts/texlive/tlmgr.pl +++ b/Master/texmf/scripts/texlive/tlmgr.pl @@ -1037,7 +1037,7 @@ sub action_path { } } else { # that should not happen - tlwarn("\nShould not happen, action_path what=$what"); + tlwarn("\ntlmgr: Should not happen, action_path what=$what"); exit 1; } return; @@ -1047,21 +1047,25 @@ sub action_path { # sub action_dumptlpdb { init_local_db(); - # set machine readable to 1 + + # we are basically doing machine-readable output. my $savemr = $::machinereadable; $::machinereadable = 1; - if ($opts{"local"}) { - # since we want to be consistent we write out the location of - # the installation, too, in the format as it is done when - # dumping the remote tlpdb + + if ($opts{"local"} && !$opts{"remote"}) { + # for consistency we write out the location of the installation, + # too, in the same format as when dumping the remote tlpdb print "location-url\t", $localtlpdb->root, "\n"; $localtlpdb->writeout; - return; - } - if ($opts{"remote"}) { + + } elsif ($opts{"remote"} && !$opts{"local"}) { init_tlmedia(); $remotetlpdb->writeout; + + } else { + tlwarn("tlmgr dump-tlpdb: need exactly one of --local and --remote.\n"); } + $::machinereadable = $savemr; return; } @@ -5804,48 +5808,52 @@ L</"TAXONOMIES"> below for details. =back -=head2 dump-tlpdb [I<options>] +=head2 list [--only-installed] [collections|schemes|I<pkg>...] -Dumps local or remote TLPDB as is to stdout. +With no argument, lists all packages available at the package +repository, prefixing those already installed with C<i>. -Options: +With the single word C<collections> or C<schemes> as the argument, lists +the request type. -=over 4 +With anything else as arguments, operates as the C<show> action. -=item B<--local> +If the option C<--only-installed> is given, the installation source will +not be used; only locally installed packages, collections, or schemes +are listed. -Dumps the local tlpdb. -=item B<--remote> +=head2 dump-tlpdb [--local|--remote] -Dumps the remote tlpdb. +Dump complete local or remote TLPDB to standard output, as-is. The +output is analogous to the C<--machine-readable> output; see +L<MACHINE-READABLE OUTPUT> section. -=back +Options: -If both B<--local> and B<--remote> is given, only the local tlpdb is dumped -out. If none is given then nothing is dumped. +=over 4 -In the line before the dump of the tlpdb the location is specified on -a line: +=item B<--local> - location-url TAB <location> +Dump the local tlpdb. +=item B<--remote> +Dump the remote tlpdb. +=back -=head2 list [--only-installed] [collections|schemes|I<pkg>...] +Exactly one of C<--local> and C<--remote> must be given. -With no argument, lists all packages available at the package -repository, prefixing those already installed with C<i>. +In either case, the first line of the output specifies the repository +location, in this format: -With the single word C<collections> or C<schemes> as the argument, lists -the request type. + "location-url" "\t" location -With anything else as arguments, operates as the C<show> action. +where C<location-url> is the literal field name, followed by a tab, and +I<location> is the file or url to the repository. -If the option C<--only-installed> is given, the installation source will -not be used; only locally installed packages, collections, or schemes -are listed. +Line endings may be either LF or CRLF depending on the current platform. =head2 check [I<option>]... [files|depends|executes|runfiles|all] |