diff options
author | Karl Berry <karl@freefriends.org> | 2016-04-11 18:27:45 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2016-04-11 18:27:45 +0000 |
commit | 729867d28dd7e08c16a3c159642c838458c662f0 (patch) | |
tree | 8594c59a6f816fa1e3c12ec240eb340505195a9e /Master | |
parent | f83331fbd02dd28ef8c0a4d3dc5a74e413ed66ac (diff) |
(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
Diffstat (limited to 'Master')
-rwxr-xr-x | Master/texmf-dist/scripts/texlive/tlmgr.pl | 37 |
1 files changed, 24 insertions, 13 deletions
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<texconfig conf> call, but works on all supported platforms. With either C<conf texmf>, C<conf tlmgr>, or C<conf updmap> given in addition, shows all key/value pairs (i.e., all settings) as saved in -C<ROOT/texmf.cnf>, the tlmgr configuration file (see below), or the +C<ROOT/texmf.cnf>, the C<tlmgr> configuration file (see below), or the first found (via kpsewhich) C<updmap.cfg> file, respectively. If I<key> is given in addition, shows the value of only that I<key> 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<value> is given in addition, I<key> is set to I<value> in the respective file. I<No error checking is done!> @@ -6582,9 +6589,13 @@ respective file. I<No error checking is done!> In all cases the file used can be explicitly specified via the option C<--conffile I<file>>, 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<tlmgr>. The directory in which +the C<tlmgr> 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<TEXMFLOCAL>). =item B<--rebuild-sys> -tells tlmgr to run necessary programs after config files have been +tells C<tlmgr> to run necessary programs after config files have been regenerated. These are: C<fmtutil-sys --all> after C<generate fmtutil>, C<fmtutil-sys --byhyphen .../language.dat> after C<generate language.dat>, @@ -7212,7 +7223,7 @@ Otherwise, if neither I<pkg> nor I<rev> are given, list the available backup revisions for all packages. With I<pkg> given but no I<rev>, list all available backup revisions of I<pkg>. -When listing available packages tlmgr shows the revision, and in +When listing available packages, C<tlmgr> shows the revision, and in parenthesis the creation time if available (in format yyyy-mm-dd hh:mm). If (and only if) both I<pkg> and a valid revision number I<rev> are |