From 729867d28dd7e08c16a3c159642c838458c662f0 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 11 Apr 2016 18:27:45 +0000 Subject: (action_conf): return F_WARNING or F_ERROR when warranted; doc tweaks. git-svn-id: svn://tug.org/texlive/trunk@40409 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/scripts/texlive/tlmgr.pl | 37 +++++++++++++++++++----------- 1 file changed, 24 insertions(+), 13 deletions(-) (limited to 'Master/texmf-dist') diff --git a/Master/texmf-dist/scripts/texlive/tlmgr.pl b/Master/texmf-dist/scripts/texlive/tlmgr.pl index 9e99cf8c75a..afa877ce975 100755 --- a/Master/texmf-dist/scripts/texlive/tlmgr.pl +++ b/Master/texmf-dist/scripts/texlive/tlmgr.pl @@ -5499,11 +5499,16 @@ sub action_init_usertree { # sub action_conf { my $arg = shift @ARGV; + my $ret = $F_OK; + if (!defined($arg)) { texconfig_conf_mimic(); - return; - } - if ($arg eq "tlmgr" || $arg eq "texmf" || $arg eq "updmap") { + + } elsif ($arg !~ /^(tlmgr|texmf|updmap)$/) { + warn "$prg: unknown conf arg: $arg (try tlmgr or texmf or updmap)\n"; + $ret = $F_ERROR; + + } else { my ($fn,$cf); if ($opts{'conffile'}) { $fn = $opts{'conffile'} ; @@ -5531,6 +5536,7 @@ sub action_conf { } } else { info("$arg config file $fn not present\n"); + $ret = $F_WARNING; } } else { if (!defined($val)) { @@ -5540,6 +5546,7 @@ sub action_conf { $cf->delete_key($key); } else { info("$arg $key not defined, cannot remove ($fn)\n"); + $ret = $F_WARNING; } } else { if (defined($cf->value($key))) { @@ -5561,6 +5568,7 @@ sub action_conf { } else { if (defined($opts{'delete'})) { warning("$arg --delete and value for key $key given, don't know what to do!\n"); + $ret = $F_ERROR; } else { info("setting $arg $key to $val (in $fn)\n"); $cf->value($key, $val); @@ -5570,8 +5578,6 @@ sub action_conf { if ($cf->is_changed) { $cf->save; } - } else { - warn "$prg: unknown conf arg: $arg (try tlmgr or texmf or updmap)\n"; } } @@ -6569,12 +6575,13 @@ like the C call, but works on all supported platforms. With either C, C, or C given in addition, shows all key/value pairs (i.e., all settings) as saved in -C, the tlmgr configuration file (see below), or the +C, the C configuration file (see below), or the first found (via kpsewhich) C file, respectively. If I is given in addition, shows the value of only that I in -the respective file. If option I<--delete> is also given, the -configuration file -- it is removed, not just commented out! +the respective file. If option I<--delete> is also given, the value in +the given configuration file is entirely removed (not just commented +out). If I is given in addition, I is set to I in the respective file. I @@ -6582,9 +6589,13 @@ respective file. I In all cases the file used can be explicitly specified via the option C<--conffile I>, in case one wants to operate on a different file. -Practical application: if the execution of (some or all) system commands -via C<\write18> was left enabled during installation, you can disable -it afterwards: +The PATH value shown is that used by C. The directory in which +the C executable is found is automatically prepended to the PATH +value inherited from the environment. + +Practical application of changing configuration values: 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 @@ -6726,7 +6737,7 @@ location in C). =item B<--rebuild-sys> -tells tlmgr to run necessary programs after config files have been +tells C to run necessary programs after config files have been regenerated. These are: C after C, C after C, @@ -7212,7 +7223,7 @@ Otherwise, if neither I nor I are given, list the available backup revisions for all packages. With I given but no I, list all available backup revisions of I. -When listing available packages tlmgr shows the revision, and in +When listing available packages, C shows the revision, and in parenthesis the creation time if available (in format yyyy-mm-dd hh:mm). If (and only if) both I and a valid revision number I are -- cgit v1.2.3