You are not logged in.

#1 2026-03-27 12:54:01

j1simon
Member
From: Denmark
Registered: 2016-01-28
Posts: 190

lua-luarocks 3.13.0-4: two bugs in post-install script

Bug 1 — First install: luarocks-admin is not found in PATH because the script runs before the newly installed binary is available:

/tmp/alpm_XpVSz3/.INSTALL: line 9: luarocks-admin: command not found

Bug 2 — Subsequent installs: The script checks for the existence of /usr/lib/luarocks/rocks-5.1/ (which exists if e.g. lua51-lpeg is installed) but does not verify that the
corresponding interpreter /usr/bin/lua5.1 exists:

sh: line 1: /usr/bin/lua5.1: No existe el fichero o el directorio

The relevant section of the post-install script:

for LUAVER in 5.{1,2,3,4,5}; do
    local tree="/usr/lib/luarocks/rocks-$LUAVER/"
    if [[ -d "$tree" ]]; then
        luarocks-admin --lua-version "$LUAVER" make_manifest --local-tree "$tree"
    fi
done

The fix should also check that the interpreter exists:

if [[ -d "$tree" ]] && command -v lua$LUAVER &>/dev/null; then

Package: lua-luarocks 3.13.0-4 (extra repo)

Offline

Board footer

Powered by FluxBB