#67289 closed defect (worksforme)

lua-luarocks explicitly does not install `luarocks` command ?

Reported by: jrjsmrtn Owned by: MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Priority: Normal Milestone:
Component: ports Version: 2.8.1
Keywords: Cc: l2dy (Zero King)
Port: lua-luarocks

Description (last modified by jrjsmrtn)

The lua-luarocks Portfile explicitly prevents the installation of luarocks, luarocks-admin commands in its post-destroot step:

foreach branch          ${lua.branches} {
    subport lua[join [split ${branch} .] ""]-luarocks {
        lua.version     ${branch}

        post-destroot {
            # only install the Lua module files
            foreach dir {bin etc} {
                delete  ${destroot}${prefix}/${dir}
            }
        }

Moreover, performing a sudo port select --set luarocks lua51-luarocks fails:

Selecting 'lua51-luarocks' for 'luarocks' failed: The specified version 'lua51-luarocks' is not valid.

Is there a reason for that ? Is there another way of installing Lua rocks ?

Change History (8)

comment:1 Changed 13 months ago by jrjsmrtn

Description: modified (diff)

comment:2 Changed 13 months ago by ryandesign (Ryan Carsten Schmidt)

Owner: set to l2dy
Status: newassigned

comment:3 Changed 13 months ago by l2dy (Zero King)

Installing lua-luarocks port will install the command you need. This change was made in [9047e79b4d7a98442d18d50e811c621aaf788560/macports-ports], where the old port select mechanism was removed.

comment:4 Changed 12 months ago by halostatue (Austin Ziegler)

Installing lua-luarocks installs luarocks 3.9 and lua 5.3. When you install lua54-luarocks, you do not get a luarocks5.4 binary, and there is no way to port select a lua version or luarocks version as the bare binaries (like you can do with py3*-pip and python3* for either python or python3, etc.).

The change for this feels like a regression. I’m not a Lua developer, but if I am explicitly trying to use Lua 5.4 with luarocks, why do I need Lua 5.3 installed — and will the installation of said rocks be applied to Lua 5.4?

comment:5 Changed 12 months ago by l2dy (Zero King)

Cc: l2dy added
Owner: changed from l2dy to MarcusCalhoun-Lopez

comment:6 Changed 12 months ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

It may seem strange to install Lua 5.3 when installing a Lua 5.4 module.
However, this was an intentional design choice.
To use your analogy of Python, it would be like a Python 3.11 module depending cmake, which in turn depends (indirectly) on Python 3.10.
There is no need for multiple cmake installations.

The old luarocks5.4 is equivalent to luarocks --lua-version=5.4, so there is no need for multiple installations of luarocks.
port contents lua-luarocks | grep /opt/local/etc shows the the files luarocks uses to install for different versions of Lua.

The port luarocks_select should be removed as it does nothing useful now.
Truth be told, I forgot about its existence.

As soon as I can get to to, we can increase the default version of Lua to 5.4.
Then, at least, luarocks will depend on Lua 5.4.

Please let me know if I am not being clear or have not addressed your concerns.

comment:7 Changed 12 months ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

Can this ticket be closed?
Have the concerns been addressed?

comment:8 Changed 12 months ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

Resolution: worksforme
Status: assignedclosed

Please feel free to reopen if all the concerns have not been addressed.

Note: See TracTickets for help on using tickets.