[tldistro] Whether/how to ship tlmgr

Ken Brown kbrow1i at gmail.com
Wed Mar 30 14:49:51 CEST 2016


On 3/29/2016 10:36 PM, Norbert Preining wrote:
> On Tue, 29 Mar 2016, Ken Brown wrote:
>> Great idea.  I also was not happy about a Cygwin-specific patch.
>
> Want to try it out?
>
> Find attached patch, and create a config file
> 	TEXMFSYSCONFIG/tlmgr/config
> that can contain all the normal config options, PLUS
> 	allowed-actions = action1,action2,...
>
> Other actions are disabled.
>
> THe 'allowed-actions' tag can only be used in TEXMFSYSCONFIG/tlmgr/config

Hi Norbert,

I like this idea much better than mine.  The only thing I don't like is 
that it treats user mode and system mode the same.  It makes more sense 
to me to only restrict what's allowed in system mode.  In user mode, I 
think we should allow whatever the current tlmgr allows.  (This is 
consistent with what my patch did, although I did it in a much more 
awkward way.)

So I would suggest the attached as an additional patch on top of yours.

Ken

-------------- next part --------------
--- tlmgr.pl~	2016-03-30 08:35:07.541811600 -0400
+++ tlmgr.pl	2016-03-30 08:41:03.687718500 -0400
@@ -590,10 +590,10 @@
   # load it BEFORE starting downloads as we set persistent-downloads there!
   load_config_file();
 
-  # verify that the selected action is allowed
-  if ($config{'allowed-actions'}) {
+  # in system mode verify that the selected action is allowed
+  if (!$opts{"usermode"} && $config{'allowed-actions'}) {
     if (!TeXLive::TLUtils::member($action, @{$config{'allowed-actions'}})) {
-      tlwarn("$prg: action not allowed: $action\n");
+      tlwarn("$prg: action not allowed in system mode: $action\n");
       exit ($F_ERROR);
     }
   }


More information about the tldistro mailing list