You are not logged in.

#1 2026-03-28 04:00:16

HHpinky
Member
Registered: 2026-03-28
Posts: 2

luarocks broken after split package update

This post was prepared with the assistance of AI for translation and formatting.

Problem Description

After the recent update that split the

luarocks

package into multiple packages (2026-03-24), the

luarocks

command is no longer functional when installed alone. It fails with:

/usr/bin/lua5.5: /usr/sbin/luarocks:7: module 'luarocks.core.cfg' not found

Additionally, post-installation hooks fail when installing other packages that trigger manifest generation.



Steps to Reproduce

In a clean Arch Linux environment (container or VM):

# 1. Install only luarocks
pacman -S luarocks

# 2. Try to use it
luarocks --help

Expected:

luarocks

command works
Actual: Module not found error

# 3. Install any Lua package that triggers the hook
pacman -S lua54-zlib

Expected: Hook completes successfully
Actual: Hook fails with same module not found error


Analysis

After investigating, I found that:

  1. The

    luarocks

    package is now split:

    • luarocks

      (6 KB) – command-line tools and hooks

    • lua-luarocks

        – actual Lua 5.5 library files

    • lua54-luarocks

      ,

      lua53-luarocks

      , etc. – for other Lua versions

  2. The

    luarocks

    package does NOT automatically install

    lua-luarocks

    :

    $ pacman -Qi luarocks | grep Depends
    Depends On      : coreutils  curl  lua  unzip  zip
  3. Without

    lua-luarocks

    , the necessary files are missing:

    $# ls /usr/share/lua/5.5/luarocks/core/
    ls: cannot access '/usr/share/lua/5.5/luarocks/core/': No such file or directory
  4. The post-installation hooks require these files:

    $ cat /usr/share/libalpm/hooks/luarocks-make-manifest-5.5.hook
    [Trigger]
    Type = Path
    Operation = Install
    Operation = Upgrade
    Operation = Remove
    Target = usr/lib/luarocks/rocks-5.5/*/**
    
    [Action]
    Description = Generating luarocks manifest for Lua 5.5...
    When = PostTransaction
    Exec = /usr/bin/luarocks-admin make_manifest --local-tree --lua-version=5.5 /usr/lib/luarocks/rocks-5.5/
    Depends = luarocks

    This hook fails because

    luarocks-admin

    requires

    luarocks.core.cfg

    from

    lua-luarocks

    .


Workaround

pacman -S lua-luarocks

After installing

lua-luarocks

, everything works as expected.



Root Cause

Looking at the PKGBUILD in the Git repository (commit from 2026-03-24), I found the issue:

package_luarocks() {
  depends+=(lua-luarocks)     #  - attempts to add dependency
  depends=(coreutils          # - overwrites the array!
           curl
           lua
           unzip
           zip)
  # ...
}

The

depends

array is overwritten immediately after appending

lua-luarocks

, causing the dependency to be lost.

Correct version should be:

package_luarocks() {
  depends=(coreutils
           curl
           lua
           unzip
           zip
           lua-luarocks)      # Add dependency here
  # or:
  # depends=(coreutils ...)
  # depends+=(lua-luarocks)   # Append after setting
}

Impact

  • New installations of

    luarocks

    are non-functional

  • Post-installation hooks fail for any package that triggers them

  • Automated scripts and containers that install

    luarocks

    will break

  • User experience: package appears broken immediately after installation


Suggested Fix

Update the PKGBUILD to correctly include

lua-luarocks

in the

depends

array for the

luarocks

package.


Additional Information

  • Package version: luarocks 3.13.0-4

  • Split introduced: 2026-03-24 (Build Date)

  • Maintainers: Daurnimator, Caleb Maclennan

  • Package size discrepancy: luarocks (6.7 KB installed) vs lua-luarocks (multiple MB, contains actual Lua modules)


Verification

After installing

lua-luarocks

:

$ luarocks --version
/usr/bin/luarocks 3.13.0
LuaRocks main command-line interface

$ luarocks list

Rocks installed for Lua 5.5
---------------------------
(no rocks installed)

All hooks also complete successfully.



Given that:

  • The

    luarocks

    binary uses Lua 5.5 (

    #!/usr/bin/lua5.5

    )

  • It requires the library files from

    lua-luarocks

    to function

I believe this is a bug that should be fixed by adding the missing dependency.


Related Links

Offline

#2 2026-03-28 07:20:05

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,432

Re: luarocks broken after split package update

This post was prepared with the assistance of AI for translation and formatting.

Next time make chatgpt search the forum first, https://bbs.archlinux.org/viewtopic.php?id=312844

Offline

#3 2026-03-28 08:53:49

HHpinky
Member
Registered: 2026-03-28
Posts: 2

Re: luarocks broken after split package update

seth wrote:

This post was prepared with the assistance of AI for translation and formatting.

Next time make chatgpt search the forum first, https://bbs.archlinux.org/viewtopic.php?id=312844

Sorry, I ran into this issue while updating and checked "Pacman & Package Upgrade Issues" first—didn't see any related post there (should've searched the whole forum). Good to see it's already been identified and will be fixed soon. Appreciate the quick work! ?

Offline

Board footer

Powered by FluxBB