summaryrefslogtreecommitdiff
path: root/Master/texmf
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-06-06 17:29:15 +0000
committerKarl Berry <karl@freefriends.org>2010-06-06 17:29:15 +0000
commit40d176ec7a6e35c640cd6033a88bc04cd82df07d (patch)
treeaf01e4fd9e18e7d68af32623e77bb2d3218739ba /Master/texmf
parentbdb1883a1cb351fab52da48dc69cf07e93dd78ed (diff)
(action_conf): tweak message texts and doc.
git-svn-id: svn://tug.org/texlive/trunk@18772 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf')
-rwxr-xr-xMaster/texmf/scripts/texlive/tlmgr.pl80
1 files changed, 44 insertions, 36 deletions
diff --git a/Master/texmf/scripts/texlive/tlmgr.pl b/Master/texmf/scripts/texlive/tlmgr.pl
index 8ab3cc79796..0f7689a93f3 100755
--- a/Master/texmf/scripts/texlive/tlmgr.pl
+++ b/Master/texmf/scripts/texlive/tlmgr.pl
@@ -3396,7 +3396,8 @@ sub action_uninstall {
system("rmdir", "--ignore-fail-on-non-empty", "$Master");
}
-# RECREATE TLPDB
+
+# RECREATE-TLPDB
#
sub action_recreate_tlpdb {
return if !check_on_writable();
@@ -3933,11 +3934,10 @@ sub check_depends {
return $ret;
}
-
-#
-# action_postaction
-# this action calls the various post actions if one want's to do that
-# on a client system or overriding global settings
+# POSTACTION
+# explictly run the various post actions, e.g.,
+# on a client system or overriding global settings.
+#
# tlmgr postaction [--w32mode=user|admin] [--fileassocmode=1|2] [--all]
# [install|remove] [shortcut|fileassoc|script] [<package> <package> ...]
@@ -4041,20 +4041,18 @@ sub action_postaction {
}
}
-
-#
-# action conf
-# tries to mimick texconfig conf but probably will add some more things
+# CONF
+# tries to mimic texconfig conf but can also set values for both tlmgr
+# and texmf conf files.
#
sub action_conf {
my $arg = shift @ARGV;
if (!defined($arg)) {
- texconfig_conf_mimick();
+ texconfig_conf_mimic();
return;
}
if ($arg eq "tlmgr" || $arg eq "texmf") {
- my $fn;
- my $cf;
+ my ($fn,$cf);
if ($arg eq "tlmgr") {
chomp (my $TEXMFCONFIG = `kpsewhich -var-value=TEXMFCONFIG`);
$fn = "$TEXMFCONFIG/tlmgr/config";
@@ -4063,11 +4061,11 @@ sub action_conf {
$fn = "$Master/texmf.cnf";
$cf = TeXLive::TLConfFile->new($fn, "[%#]", "=");
}
- my ($key, $val) = @ARGV;
+ my ($key,$val) = @ARGV;
if (!defined($key)) {
# show all settings
if ($cf) {
- info("$arg configuration values:\n");
+ info("$arg configuration values (from $fn):\n");
for my $k ($cf->keys) {
info("$k = " . $cf->value($k) . "\n");
}
@@ -4077,30 +4075,35 @@ sub action_conf {
} else {
if (!defined($val)) {
if (defined($cf->value($key))) {
- info("$arg config setting $key = " . $cf->value($key) . "\n");
+ info("$arg $key value: " . $cf->value($key) . " ($fn)\n");
} else {
- info("$key not defined in $arg config file\n");
+ info("$key not defined in $arg config file ($fn)\n");
if ($arg eq "texmf") {
+ # not in user-specific file, show anything kpsewhich gives us.
chomp (my $defval = `kpsewhich -var-value $key`);
if ($? != 0) {
- info("No default value for $key is known.\n");
+ info("$arg $key default value is unknown");
} else {
- info("Default value for $key is $defval\n");
+ info("$arg $key default value: $defval");
}
+ info(" (kpsewhich -var-value)\n");
}
}
} else {
+ info("setting $arg $key to $val (in $fn)\n");
$cf->value($key, $val);
}
}
if ($cf->is_changed) {
$cf->save;
}
+ } else {
+ warn "tlmgr: unknown conf arg: $arg (try tlmgr or texmf)\n";
}
}
-
-sub texconfig_conf_mimick {
+# output various values in same form as texconfig conf.
+sub texconfig_conf_mimic {
my $PATH = $ENV{'PATH'};
info("=========================== version information ==========================\n");
info(give_version());
@@ -5185,28 +5188,33 @@ programs, C<--> stops parsing for arguments at the point where it
appears; this is a general feature of option parsing.)
-=head2 conf [texmf|tlmgr [key [value]]]
-
-With only the C<conf> given show general configuration information for
-TeX Live, including active configuration files, path settings, and more.
+=head2 conf [texmf|tlmgr [I<key> [I<value>]]]
-This option to C<tlmgr> mimics the C<texconfig conf> call, but works on
-all supported platforms.
+With only the C<conf>, show general configuration information for TeX
+Live, including active configuration files, path settings, and more.
+This is like the C<texconfig conf> call, but works on all supported
+platforms.
With either C<texmf> or C<tlmgr> given in addition, shows all key/value
-pairs (i.e., all settings) as saved in C<ROOT/texmf.cnf> and the tlmgr
+pairs (i.e., all settings) as saved in C<ROOT/texmf.cnf> or the tlmgr
configuration file (see below), respectively.
-If C<key> is given in addition, shows the value of that given C<key> in
-the respective file.
+If I<key> is given in addition, shows the value of only that given
+I<key> in the respective file.
+
+If I<value> is given in addition, I<key> is set to I<value> in the
+respective file. I<No error checking is done!>
+
+Practical application: if the execution of (some or all) system commands
+via C<\write18> was left enabled during installation, you can disable
+it afterwards:
+
+ tlmgr conf texmf shell_escape 0
-If C<value> is given in addition, C<key> is set to C<value> in the
-respective file.
+B<WARNING:> The general facility is here, but tinkering with settings in
+this way is very strongly discouraged. Again, no error checking is
+done, so any sort of breakage is possible.
-B<WARNING:> Setting arbitrary keys in the tlmgr config file (i.e., with
-C<tlmgr conf tlmgr I<key> I<value>> is I<not> a good idea as tlmgr does
-only understand a limited number of options with specific values, and this
-function does I<not> check for these properties.
=head2 paper