summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2008-05-03 10:42:27 +0000
committerNorbert Preining <preining@logic.at>2008-05-03 10:42:27 +0000
commit9dd95f164399b9b9cb7724b63a1c06873e99869c (patch)
tree910abc9b4ebd9ca222a4687a489783f0f1ed6196
parent9854f1ff31ca1215af87efec55b5256c8f4c75e6 (diff)
better option handling, and better documentation
git-svn-id: svn://tug.org/texlive/trunk@7815 c570f23f-e606-0410-a88d-b1316a301751
-rwxr-xr-xMaster/texmf/scripts/texlive/tlmgr.pl117
1 files changed, 79 insertions, 38 deletions
diff --git a/Master/texmf/scripts/texlive/tlmgr.pl b/Master/texmf/scripts/texlive/tlmgr.pl
index dc1413d3c93..2aea411f332 100755
--- a/Master/texmf/scripts/texlive/tlmgr.pl
+++ b/Master/texmf/scripts/texlive/tlmgr.pl
@@ -47,7 +47,7 @@ use TeXLive::TLWinGoo;
TeXLive::TLUtils->import( qw(kpsewhich member win32) );
use Cwd qw/abs_path/;
use Pod::Usage;
-use Getopt::Long qw(:config no_autoabbrev require_order pass_through);
+use Getopt::Long qw(:config no_autoabbrev require_order);
use strict;
# used variables
@@ -430,11 +430,9 @@ sub action_update {
init_local_db();
# initialize the TLMedia from $location
my $opt_nodepends = 0;
- my $opt_force = 0;
my $opt_dry = 0;
Getopt::Long::Configure(qw(no_pass_through));
GetOptions("no-depends" => \$opt_nodepends,
- "force" => \$opt_force,
"dry-run" => \$opt_dry) or pod2usage(1);
my $ret = 0;
$tlmediasrc = TeXLive::TLMedia->new($location);
@@ -471,11 +469,9 @@ sub action_install {
init_local_db();
# initialize the TLMedia from $location
my $opt_nodepends = 0;
- my $opt_force = 0;
my $opt_dry = 0;
Getopt::Long::Configure(qw(no_pass_through));
GetOptions("no-depends" => \$opt_nodepends,
- "force" => \$opt_force,
"dry-run" => \$opt_dry) or pod2usage(1);
my $ret = 0;
$tlmediasrc = TeXLive::TLMedia->new($location);
@@ -577,13 +573,9 @@ sub action_default {
sub action_arch {
my $what = shift @ARGV;
my $ret = 0;
- my $opt_nodepends = 0;
- my $opt_force = 0;
my $opt_dry = 0;
Getopt::Long::Configure(qw(no_pass_through));
- GetOptions("no-depends" => \$opt_nodepends,
- "force" => \$opt_force,
- "dry-run" => \$opt_dry) or pod2usage(1);
+ GetOptions("dry-run" => \$opt_dry) or pod2usage(1);
init_local_db();
if ($what =~ m/^list$/i) {
# list the available architectures
@@ -629,7 +621,7 @@ sub action_arch {
if ($opt_dry) {
print "Installing $pkg.$a\n";
} else {
- $ret |= $tlmediasrc->install_package("$pkg.$a", $localtlpdb, $opt_nodepends, 1);
+ $ret |= $tlmediasrc->install_package("$pkg.$a", $localtlpdb, 0, 1);
}
}
}
@@ -637,8 +629,8 @@ sub action_arch {
}
if (TeXLive::TLUtils::member('win32', @todoarchs)) {
# install the necessary win32 stuff
- $ret |= $tlmediasrc->install_package("bin-tlperl.win32", $localtlpdb, $opt_nodepends, 1);
- $ret |= $tlmediasrc->install_package("bin-tlgs.win32", $localtlpdb, $opt_nodepends, 1);
+ $ret |= $tlmediasrc->install_package("bin-tlperl.win32", $localtlpdb, 1, 1);
+ $ret |= $tlmediasrc->install_package("bin-tlgs.win32", $localtlpdb, 1, 1);
}
} else {
die "Unknown option for arch: $what";
@@ -902,7 +894,7 @@ tlmgr - the TeX Live Manager
=head1 SYNOPSIS
-tlmgr ACTION [OPTIONS] ...
+tlmgr [OPTIONS] ACTION ...
=head1 ACTION
@@ -912,16 +904,46 @@ tlmgr ACTION [OPTIONS] ...
Gives this help page.
-=item B<install pkg1 [pkg2 [pkg3 ...]]>
+=item B<install [options] pkg1 [pkg2 [pkg3 ...]]>
Install all packages given on the cmdline. By default this installs all
dependencies, too. See below for the option B<-no-depends>.
-=item B<update>
+B<Supported options>
+
+=over 16
+
+=item B<-no-depends>
+
+Do not install dependencies. If this option is not given installing
+a package will check that all dependencies of this package are fulfilled.
+
+=item B<-dry-run>
+
+Enables the chicken
+mode, i.e., nothing is actually installed but the actions to be performed
+are written to the terminal.
+
+=back
+
+=item B<update [options]>
Update all packages if newer ones are available
-=item B<remove pkg1 [pkg2 [pkg3 ...]]>
+B<Supported options>
+
+=over 16
+
+=item B<-dry-run>
+
+Enables the chicken
+mode, i.e., nothing is actually installed but the actions to be performed
+are written to the terminal.
+
+=back
+
+
+=item B<remove [options] pkg1 [pkg2 [pkg3 ...]]>
Remove all packages given on the cmdline. Removing a collection will
remove all dependencies, too, unless with option B<-no-depends>.
@@ -929,6 +951,30 @@ remove all dependencies, too, unless with option B<-no-depends>.
Removing a package which is referenced as a dependency in another
collection or scheme will not succeed unless the B<-force> option is given.
+B<Supported options>
+
+=over 16
+
+=item B<-no-depends>
+
+Do not remove depending packages.
+
+=item B<-force>
+
+When removing a package or collection would invalidate a dependency
+of another collection/scheme, the package will not be removed and
+a warning issued. With this options the package will be removed
+unconditionally. Use with care.
+
+=item B<-dry-run>
+
+Enables the chicken
+mode, i.e., nothing is actually removed but the actions to be performed
+are written to the terminal.
+
+=back
+
+
=item B<default show>
=item B<default C<key> [C<value>]>
@@ -960,6 +1006,22 @@ Prints the list of arch-os available at the default install location.
Adds binaries for the given architectures to the installtion.
+
+B<Supported options>
+
+=over 16
+
+=item B<-dry-run>
+
+For installation and removal of packages, this options enables the chicken
+mode, i.e., nothing is actually installed but the actions to be performed
+are written to the terminal.
+
+Note that for all other type of options but package installation and removal
+this options does B<NOT> work!
+
+=back
+
=item B<search [-file] what>
Search the names, short and long descriptions of all locally installed packages
@@ -1033,27 +1095,6 @@ in TEXMFSYSVAR).
Overrides the location as found in the tlpdb of the installation. Specifies
the location from which packages should be installed or updated.
-=item B<-no-depends>
-
-Do not install dependencies. If this option is not given installing
-a package will check that all dependencies of this package are fulfilled.
-
-=item B<-force>
-
-When removing a package or collection would invalidate a dependency
-of another collection/scheme, the package will not be removed and
-a warning issued. With this options the package will be removed
-unconditionally. Use with care.
-
-=item B<-dry-run>
-
-For installation and removal of packages, this options enables the chicken
-mode, i.e., nothing is actually installed but the actions to be performed
-are written to the terminal.
-
-Note that for all other type of options but package installation and removal
-this options does B<NOT> work!
-
=item B<-netarchive> I<dir>
Overrides the default settings for netarchive. Should be used with care.