summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2008-10-22 23:48:29 +0000
committerKarl Berry <karl@freefriends.org>2008-10-22 23:48:29 +0000
commitc472e1a6f7df9c6afe03c2856d7e76e118d7b28e (patch)
tree9238009c8f13498b0720376dc03a185a074993b0 /Master
parent45da8874b53205aff1859f4849edaf30ed6f19a2 (diff)
(@getopt_configure_subopts): new list of strings
for each action to pass to Getopt::Long::Configure; include permute. git-svn-id: svn://tug.org/texlive/trunk@11031 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rwxr-xr-xMaster/texmf/scripts/texlive/tlmgr.pl33
1 files changed, 18 insertions, 15 deletions
diff --git a/Master/texmf/scripts/texlive/tlmgr.pl b/Master/texmf/scripts/texlive/tlmgr.pl
index bb8cf23c166..5cd4da66a07 100755
--- a/Master/texmf/scripts/texlive/tlmgr.pl
+++ b/Master/texmf/scripts/texlive/tlmgr.pl
@@ -93,7 +93,10 @@ my %options;
# the location from where we install
my $location;
-# option handling
+# each action uses this.
+my @getopt_configure_subopts = qw(no_pass_through permute);
+
+# option variables
my $opt_location;
my $opt_help = 0;
my $opt_version = 0;
@@ -457,7 +460,7 @@ sub action_remove {
my $opt_reallynodepends = 0;
my $opt_force = 0;
my $opt_dry = 0;
- Getopt::Long::Configure(qw(no_pass_through));
+ Getopt::Long::Configure(@getopt_configure_subopts);
GetOptions("no-depends" => \$opt_nodepends,
"no-depends-at-all" => \$opt_reallynodepends,
"force" => \$opt_force,
@@ -583,7 +586,7 @@ sub action_show {
sub action_search {
my $opt_global = 0;
my $opt_file = 0;
- Getopt::Long::Configure(qw(no_pass_through));
+ Getopt::Long::Configure(@getopt_configure_subopts);
GetOptions("global" => \$opt_global,
"file" => \$opt_file) or pod2usage(2);
my $r = shift @ARGV;
@@ -630,7 +633,7 @@ sub action_restore {
my $opt_backupdir;
my $opt_force;
my $opt_dry = 0;
- Getopt::Long::Configure(qw(no_pass_through));
+ Getopt::Long::Configure(@getopt_configure_subopts);
GetOptions("backupdir=s" => \$opt_backupdir,
"dry-run" => \$opt_dry,
"force" => \$opt_force) or pod2usage(2);
@@ -706,7 +709,7 @@ sub action_backup {
my $opt_dry = 0;
my $opt_all = 0;
my $opt_backupdir;
- Getopt::Long::Configure(qw(no_pass_through));
+ Getopt::Long::Configure(@getopt_configure_subopts);
GetOptions("all" => \$opt_all,
"backupdir=s" => \$opt_backupdir,
) or pod2usage(2);
@@ -897,7 +900,7 @@ sub action_update {
my $opt_list = 0;
my $opt_noremove = 0;
my $opt_backupdir;
- Getopt::Long::Configure(qw(no_pass_through));
+ Getopt::Long::Configure(@getopt_configure_subopts);
GetOptions("no-depends" => \$opt_nodepends,
"no-depends-at-all" => \$opt_reallynodepends,
"all" => \$opt_all,
@@ -1004,9 +1007,9 @@ sub action_update {
# 2) it is not mentioned, then it is really a new package and will
# be auto installed.
if (grep(/^$d$/, @localtlcdeps)) {
- $forcermpkgs{$d} = "$c";
+ $forcermpkgs{$d} = $c;
} else {
- $newpkgs{$d} = "$c";
+ $newpkgs{$d} = $c;
}
}
}
@@ -1036,7 +1039,7 @@ sub action_update {
info("skipping forcibly removed package $pkg ($forcerm_coll)\n");
next;
} elsif ($newpkgs{$pkg}) {
- # do nothing here, it will be reported below!
+ # do nothing here, it will be reported below.
} elsif (defined($removals{$pkg})) {
# skipping this package, it has been removed due to server removal
next;
@@ -1058,7 +1061,7 @@ sub action_update {
if (ref $foo) {
# installation succeeded because we got a reference
merge_into (\%ret, $foo);
- logpackage("auto install new: $pkg ($mediarev)");
+ logpackage("auto-install new: $pkg ($mediarev)");
$nrupdated++;
} else {
tlwarn("$0: couldn't install new package $pkg\n");
@@ -1219,7 +1222,7 @@ sub action_install {
my $opt_reallynodepends = 0;
my $opt_dry = 0;
my $opt_reinstall = 0;
- Getopt::Long::Configure(qw(no_pass_through));
+ Getopt::Long::Configure(@getopt_configure_subopts);
GetOptions("no-depends" => \$opt_nodepends,
"no-depends-at-all" => \$opt_reallynodepends,
"reinstall" => \$opt_reinstall,
@@ -1365,7 +1368,7 @@ sub action_arch {
}
my %ret;
my $opt_dry = 0;
- Getopt::Long::Configure(qw(no_pass_through));
+ Getopt::Long::Configure(@getopt_configure_subopts);
GetOptions("dry-run" => \$opt_dry) or pod2usage(2);
my $what = shift @ARGV;
init_local_db(1);
@@ -1444,7 +1447,7 @@ sub action_arch {
sub action_generate {
my $localconf = "";
my $dest = "";
- Getopt::Long::Configure(qw(no_pass_through));
+ Getopt::Long::Configure(@getopt_configure_subopts);
GetOptions("localcfg=s" => \$localconf, "dest=s" => \$dest,) or pod2usage(2);
my $what = shift @ARGV;
init_local_db();
@@ -1583,7 +1586,7 @@ sub action_uninstall {
action_gui("uninstall");
}
my $force = 0;
- Getopt::Long::Configure(qw(no_pass_through));
+ Getopt::Long::Configure(@getopt_configure_subopts);
GetOptions("force" => \$force) or pod2usage(2);
if (!$force) {
print("If you answer yes here the whole TeX Live installation will be removed!\n");
@@ -1707,7 +1710,7 @@ sub action_uninstall {
sub action_check {
my $svn = 0;
- Getopt::Long::Configure(qw(no_pass_through));
+ Getopt::Long::Configure(@getopt_configure_subopts);
GetOptions("use-svn" => \$svn) or pod2usage(2);
my $what = shift @ARGV;
$what || ($what = "all");