Multiple version of Lua with alternatives

Lemures Lemniscati lemures.lemniscati@gmail.com
Sun Feb 28 09:34:36 GMT 2021


On Sat, 27 Feb 2021 13:32:37 +0100, Achim Gratz
> Lemures Lemniscati via Cygwin-apps writes:
> >> > I've understood that we should avoid /usr/local.
> 
> Specifically we should avoid to put files or directories there, so if
> you ever envision to have luarocks wrapped up as Cygwin packages that is
> definitiely the wrong place for them to end up at.  OTOH, if you think
> of luarocks as things that only ever exist locally, then it might be OK
> (but even the empty directory must not be packaged).
> 
> >> > And, choices for a tree-prefix where luarocks will install rocks are:
> >> > 1) luarocks_tree=/usr/share/lua/luarocks
> 
> That only makes sense if luarocks aren't architecture specific.  In
> other words if you had multiple lua installations of the same version
> targeting different architectures and they could all share the exact
> same luarocks, then these should be installed into that location.


A problem is that ${luarock_tree} can contain both
architecutre-independent components and -specific ones,
and that components in ${luarocks_tree}/bin might be
architecture-specfic or architecture-independent.

Architecture-specific
(scripts under bin might be architecture-independent):
  ${luarocks_tree}/bin
  ${luarocks_tree}/lib/lua/5.3
  ${luarocks_tree}/lib/lua/5.4
  ${luarocks_tree}/lib/luarocks/rocks-5.3/
  ${luarocks_tree}/lib/luarocks/rocks-5.4/

Architecture-independent:
  ${luarocks_tree}/share/lua/5.3
  ${luarocks_tree}/share/lua/5.4


Then, although I don't know it can be easily configured,
here might be candidates to separate architecture-specific and
-independent components:

(A) simply using mixed tree prefixes
luarocks_tree=/usr/lib/lua/luarocks
  ${luarocks_tree}/bin
  ${luarocks_tree}/lib/lua/5.3
  ${luarocks_tree}/lib/lua/5.4
  ${luarocks_tree}/lib/luarocks/rocks-5.3/
  ${luarocks_tree}/lib/luarocks/rocks-5.4/

luarocks_tree=/usr/share/lua/luarocks
  ${luarocks_tree}/share/lua/5.3
  ${luarocks_tree}/share/lua/5.4

(B) using mixed tree prefixes and removing tautological directories
luarocks_tree=/usr/lib/lua/luarocks
  ${luarocks_tree}/bin
  ${luarocks_tree}/5.3
  ${luarocks_tree}/5.4
  ${luarocks_tree}/rocks-5.3/
  ${luarocks_tree}/rocks-5.4/

luarocks_tree=/usr/share/lua/luarocks
  ${luarocks_tree}/5.3
  ${luarocks_tree}/5.4

Other suggestions are welcome.

Regards,

Lem



More information about the Cygwin-apps mailing list