diff options
author | Karl Berry <karl@freefriends.org> | 2023-02-27 17:09:29 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2023-02-27 17:09:29 +0000 |
commit | 7527949b44f3a599b551cca30f2be07330fb0d98 (patch) | |
tree | 0b72e8a8b674fc2813d7a1d282462fd3ac39cf73 /Master/texmf-dist | |
parent | 2ed330652015c8620717b360a563b49a17454b8d (diff) |
rename path --w32mode to --windowsmode (from norbert)
git-svn-id: svn://tug.org/texlive/trunk@66218 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r-- | Master/texmf-dist/scripts/texlive/NEWS | 3 | ||||
-rwxr-xr-x | Master/texmf-dist/scripts/texlive/tlmgr.pl | 66 |
2 files changed, 36 insertions, 33 deletions
diff --git a/Master/texmf-dist/scripts/texlive/NEWS b/Master/texmf-dist/scripts/texlive/NEWS index 1707ed34b9e..daa0f9fc0ca 100644 --- a/Master/texmf-dist/scripts/texlive/NEWS +++ b/Master/texmf-dist/scripts/texlive/NEWS @@ -1,6 +1,9 @@ (This file public domain. Originally written by Norbert Preining and Karl Berry, 2010.) +<p><b>tlmgr 66218 (released 27feb23):</b> +<li>rename "path --w32mode" option to --windowsmode; similar throughout. + <p><b>tlmgr 63033 (released 17apr22):</b> <li>tlmgr check files also ignores the tlmgr*.log files. <li>document that in user mode, tlmgr*.log are written to TEXMFVAR. diff --git a/Master/texmf-dist/scripts/texlive/tlmgr.pl b/Master/texmf-dist/scripts/texlive/tlmgr.pl index 192ec7af905..6ebbd307583 100755 --- a/Master/texmf-dist/scripts/texlive/tlmgr.pl +++ b/Master/texmf-dist/scripts/texlive/tlmgr.pl @@ -246,7 +246,7 @@ my %action_specification = ( "function" => \&action_paper }, "path" => { - "options" => { "w32mode" => "=s" }, + "options" => { "windowsmode|w32mode" => "=s" }, "run-post" => 0, "function" => \&action_path }, @@ -264,7 +264,7 @@ my %action_specification = ( "options" => { "all" => 1, "fileassocmode" => "=i", - "w32mode" => "=s", + "windowsmode|w32mode" => "=s", }, "run-post" => 0, "function" => \&action_postaction @@ -1506,56 +1506,56 @@ sub action_path { my $winadminmode = 0; if (wndws()) { # - # for w32 we do system wide vs user setting detection as follows: - # - if --w32mode is NOT given, + # for windows we do system wide vs. user setting detection as follows: + # - if --windowsmode is NOT given, # - if admin # --> honor opt_w32_multi_user setting in tlpdb # - if not admin # - if opt_w32_multi_user == NO # --> do user path adjustment # - if opt_w32_multi_user == YES - # --> do nothing, warn that the setting is on, suggest --w32mode user - # - if --w32mode admin + # --> do nothing, warn the setting is on, suggest --windowsmode user + # - if --windowsmode admin # - if admin # --> ignore opt_w32_multi_user and do system path adjustment # - if non-admin # --> do nothing but warn that user does not have privileges - # - if --w32mode user + # - if --windowsmode user # - if admin # --> ignore opt_w32_multi_user and do user path adjustment # - if non-admin # --> ignore opt_w32_multi_user and do user path adjustment - if (!$opts{"w32mode"}) { + if (!$opts{"windowsmode"}) { $winadminmode = $localtlpdb->option("w32_multi_user"); if (!TeXLive::TLWinGoo::admin()) { if ($winadminmode) { - tlwarn("The TLPDB specifies system wide path adjustments\nbut you don't have admin privileges.\nFor user path adjustment please use\n\t--w32mode user\n"); + tlwarn("The TLPDB specifies system wide path adjustments\nbut you don't have admin privileges.\nFor user path adjustment please use\n\t--windowsmode user\n"); # and do nothing return ($F_ERROR); } } } else { - # we are in the block where a --w32mode argument is given + # we are in the block where a --windowsmode argument is given # we reverse the tests: if (TeXLive::TLWinGoo::admin()) { # in admin mode we simply use what is given on the cmd line - if ($opts{"w32mode"} eq "user") { + if ($opts{"windowsmode"} eq "user") { $winadminmode = 0; - } elsif ($opts{"w32mode"} eq "admin") { + } elsif ($opts{"windowsmode"} eq "admin") { $winadminmode = 1; } else { - tlwarn("$prg: unknown --w32admin mode: $opts{w32mode}, should be 'admin' or 'user'\n"); + tlwarn("$prg: unknown --windowsmode mode: $opts{windowsmode}, should be 'admin' or 'user'\n"); return ($F_ERROR); } } else { # we are non-admin - if ($opts{"w32mode"} eq "user") { + if ($opts{"windowsmode"} eq "user") { $winadminmode = 0; - } elsif ($opts{"w32mode"} eq "admin") { - tlwarn("$prg: You don't have the privileges to work in --w32mode admin\n"); + } elsif ($opts{"windowsmode"} eq "admin") { + tlwarn("$prg: You don't have the privileges to work in --windowsmode admin\n"); return ($F_ERROR); } else { - tlwarn("$prg: unknown --w32admin mode: $opts{w32mode}, should be 'admin' or 'user'\n"); + tlwarn("$prg: unknown --windowsmode mode: $opts{windowsmode}, should be 'admin' or 'user'\n"); return ($F_ERROR); } } @@ -6145,7 +6145,7 @@ sub check_texmfdbs { # explicitly run the various post actions, e.g., # on a client system or overriding global settings. # -# tlmgr postaction [--w32mode=user|admin] [--fileassocmode=1|2] [--all] +# tlmgr postaction [--windowsmode=user|admin] [--fileassocmode=1|2] [--all] # [install|remove] [shortcut|fileassoc|script] [<pkg>...] sub action_postaction { @@ -6166,8 +6166,8 @@ sub action_postaction { return; } if (wndws()) { - if ($opts{"w32mode"}) { - if ($opts{"w32mode"} eq "user") { + if ($opts{"windowsmode"}) { + if ($opts{"windowsmode"} eq "user") { if (TeXLive::TLWinGoo::admin()) { debug("Switching to user mode on user request\n"); TeXLive::TLWinGoo::non_admin(); @@ -6175,13 +6175,13 @@ sub action_postaction { # in user mode we also switch TEXMFSYSVAR to TEXMFVAR since # xetex.pl, but maybe others are writing to TEXMFSYSVAR chomp($ENV{"TEXMFSYSVAR"} = `kpsewhich -var-value TEXMFVAR`); - } elsif ($opts{"w32mode"} eq "admin") { + } elsif ($opts{"windowsmode"} eq "admin") { if (!TeXLive::TLWinGoo::admin()) { - tlwarn("$prg: you don't have the permissions for --w32mode=admin\n"); + tlwarn("$prg: you don't have permission for --windowsmode=admin\n"); return; } } else { - tlwarn("$prg: action postaction --w32mode can only be 'admin' or 'user'\n"); + tlwarn("$prg: action postaction --windowsmode can only be 'admin' or 'user'\n"); return; } } @@ -8789,9 +8789,9 @@ settings. =over 4 -=item B<path [--w32mode=user|admin] add> +=item B<path [--windowsmode=user|admin] add> -=item B<path [--w32mode=user|admin] remove> +=item B<path [--windowsmode=user|admin] remove> On Unix, adds or removes symlinks for executables, man pages, and info pages in the system directories specified by the respective options (see @@ -8803,21 +8803,21 @@ command must be rerun as needed. On Windows, the registry part where the binary directory is added or removed is determined in the following way: -If the user has admin rights, and the option C<--w32mode> is not given, +If the user has admin rights, and the option C<--windowsmode> is not given, the setting I<w32_multi_user> determines the location (i.e., if it is on then the system path, otherwise the user path is changed). -If the user has admin rights, and the option C<--w32mode> is given, this +If the user has admin rights, and the option C<--windowsmode> is given, this option determines the path to be adjusted. -If the user does not have admin rights, and the option C<--w32mode> +If the user does not have admin rights, and the option C<--windowsmode> is not given, and the setting I<w32_multi_user> is off, the user path is changed, while if the setting I<w32_multi_user> is on, a warning is issued that the caller does not have enough privileges. -If the user does not have admin rights, and the option C<--w32mode> +If the user does not have admin rights, and the option C<--windowsmode> is given, it must be C<user> and the user path will be adjusted. If a -user without admin rights uses the option C<--w32mode admin> a warning +user without admin rights uses the option C<--windowsmode admin> a warning is issued that the caller does not have enough privileges. =back @@ -8916,13 +8916,13 @@ Options: =over 4 -=item B<--w32mode=[user|admin]> +=item B<--windowsmode=[user|admin]> -If the option C<--w32mode> is given the value C<user>, all actions will +If the option C<--windowsmode> is given the value C<user>, all actions will only be carried out in the user-accessible parts of the registry/filesystem, while the value C<admin> selects the system-wide parts of the registry for the file associations. If you do not have -enough permissions, using C<--w32mode=admin> will not succeed. +enough permissions, using C<--windowsmode=admin> will not succeed. =item B<--fileassocmode=[1|2]> |