summaryrefslogtreecommitdiff
path: root/Master/texmf
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2012-04-18 05:50:18 +0000
committerNorbert Preining <preining@logic.at>2012-04-18 05:50:18 +0000
commitdaf940e73bfb285cff687af16fe63e0fffc47b20 (patch)
treefafafdf879e782de89b9abf323f56903b67dc9f7 /Master/texmf
parent33cd7a1f8c5960fcd549e931ce40068ba5c76451 (diff)
merge action show and action list into a new action "info" that does
the same. git-svn-id: svn://tug.org/texlive/trunk@26025 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf')
-rwxr-xr-xMaster/texmf/scripts/texlive/tlmgr.pl91
1 files changed, 49 insertions, 42 deletions
diff --git a/Master/texmf/scripts/texlive/tlmgr.pl b/Master/texmf/scripts/texlive/tlmgr.pl
index 3612cc6fb35..b1ea48b0c69 100755
--- a/Master/texmf/scripts/texlive/tlmgr.pl
+++ b/Master/texmf/scripts/texlive/tlmgr.pl
@@ -152,7 +152,6 @@ sub main {
"reinstall" => 1,
"force" => 1,
"dry-run|n" => 1 },
- "list" => { "only-installed" => 1 },
"paper" => { "list" => 1 },
"path" => { "w32mode" => "=s" },
"platform" => { "dry-run|n" => 1 },
@@ -177,11 +176,12 @@ sub main {
"characterization" => 1,
"functionality" => 1,
"taxonomy" => 1 },
- "show" => { "list" => 1,
+ "info" => { "list" => 1,
"taxonomy" => 1,
"keyword" => 1,
"characterization" => 1,
- "functionality" => 1 },
+ "functionality" => 1,
+ "only-installed" => 1 },
"dump-tlpdb" => { "local" => 1,
"remote" => 1 },
"uninstall" => { "force" => 1 },
@@ -317,6 +317,11 @@ for the full story.\n";
$action = "paper";
}
+ # backward compatibility with action "show" and "list" from before
+ if ($action =~ /^(show|list)$/) {
+ $action = "info";
+ }
+
# --machine-readable is only supported by update.
if ($::machinereadable &&
$action ne "update" && $action ne "install" && $action ne "option") {
@@ -513,9 +518,6 @@ sub execute_action {
} elsif ($action =~ m/^candidates$/i) {
action_candidates();
finish(0);
- } elsif ($action =~ m/^list$/i) {
- action_list();
- finish(0);
} elsif ($action =~ m/^check$/i) {
action_check();
} elsif ($action =~ m/^install$/i) {
@@ -541,8 +543,8 @@ sub execute_action {
} elsif ($action =~ m/^dump-tlpdb$/i) {
action_dumptlpdb();
finish(0);
- } elsif ($action =~ m/^show$/i) {
- action_show(@ARGV);
+ } elsif ($action =~ m/^info$/i) {
+ action_info(@ARGV);
finish(0);
} elsif ($action =~ m/^remove$/i) {
action_remove();
@@ -1142,9 +1144,9 @@ sub action_dumptlpdb {
return;
}
-# SHOW
+# INFO
#
-sub action_show {
+sub action_info {
init_local_db();
my $taxonomy;
if ($opts{"taxonomy"} || $opts{"characterization"} || $opts{"functionality"}
@@ -1154,7 +1156,20 @@ sub action_show {
tlwarn("tlmgr: Cannot load taxonomy file, showing taxonomies not supported.\n");
}
}
- foreach my $ppp (@_) {
+ my ($what, @todo) = @ARGV;
+ #
+ # tlmgr info
+ # tlmgr info collection
+ # tlmgr info scheme
+ # these commands just list the packages/collections/schemes installed with
+ # a short list
+ if (!defined($what) || ($what =~ m/^(collection|scheme)$/i)) {
+ show_list_of_packages($what);
+ return;
+ }
+ # we are still here, so $what is defined and neither collection nor scheme,
+ # so assume the arguments are package names
+ foreach my $ppp ($what, @todo) {
my ($pkg, $tag) = split '@', $ppp, 2;
my $tlpdb = $localtlpdb;
my $tlp = $localtlpdb->get_package($pkg);
@@ -1206,7 +1221,7 @@ sub action_show {
my ($t,$r) = split(/\//, $a, 2);
push @aaa, "$pkg" . '@' . $t;
}
- action_show(@aaa);
+ action_info(@aaa);
next;
} else {
tlwarn("strange, package listed but no residual candidates: $pkg\n");
@@ -3370,22 +3385,12 @@ sub action_install {
}
}
-sub action_list {
+sub show_list_of_packages {
init_local_db();
# make sure that the @ARGV hash is not changed in case we switch to
# show mode
- my ($what) = @ARGV;
- if ($what) {
- # if the argument to list is either 'collection' or 'scheme'
- # we list them, otherwise we go direct into tlmgr show $pkg mode
- if ($what !~ m/^(collection|scheme)/i) {
- tlwarn("(switching to show mode)\n");
- action_show(@ARGV);
- return;
- }
- } else {
- $what = "";
- }
+ my ($what) = @_;
+ $what = "" if !$what;
my $tlm;
if ($opts{"only-installed"}) {
$tlm = $localtlpdb;
@@ -6357,9 +6362,16 @@ Search for package names, descriptions, and taxonomies, but not files.
=back
-=head2 show [I<options>] I<pkg>...
+=head2 info [I<options>] [collections|schemes|I<pkg>...]
+
+With no argument, lists all packages available at the package
+repository, prefixing those already installed with C<i>.
+
+With the single word C<collections> or C<schemes> as the argument, lists
+the request type instead of all packages.
-Display information about I<pkg>: the name, category, short and long
+With anything else as arguments,
+display information about I<pkg>: the name, category, short and long
description, installation status, and TeX Live revision number.
Searches in the remote installation source for the package if it is not
locally installed.
@@ -6370,6 +6382,9 @@ package version, approximations only, due to timing skew of the updates
of the difference pieces. The C<revision> value, by contrast, comes
directly from TL and is reliable.
+The former actions B<show> and B<list> are merged into this action,
+but are still supported for backward compatibility.
+
Options:
=over 4
@@ -6381,6 +6396,13 @@ files is also shown, including those for platform-specific dependencies.
When given with schemes and collections, C<--list> outputs their
dependencies in a similar way.
+=item B<--only-installed>
+
+If this options is given, the installation source will
+not be used; only locally installed packages, collections, or schemes
+are listed.
+(Does not work for listing of packages for now)
+
=item B<--taxonomy>
=item B<--keyword>
@@ -6396,21 +6418,6 @@ L</"TAXONOMIES"> below for details.
=back
-=head2 list [--only-installed] [collections|schemes|I<pkg>...]
-
-With no argument, lists all packages available at the package
-repository, prefixing those already installed with C<i>.
-
-With the single word C<collections> or C<schemes> as the argument, lists
-the request type.
-
-With anything else as arguments, operates as the C<show> action.
-
-If the option C<--only-installed> is given, the installation source will
-not be used; only locally installed packages, collections, or schemes
-are listed.
-
-
=head2 dump-tlpdb [--local|--remote]
Dump complete local or remote TLPDB to standard output, as-is. The