FS#75927 - [luarocks] Upgrades produces errors owing to making manifests

Attached to Project: Community Packages
Opened by Yuri Kanivetsky (x-yuri) - Saturday, 17 September 2022, 15:06 GMT
Last edited by Buggy McBugFace (bugbot) - Saturday, 25 November 2023, 20:07 GMT
Task Type Bug Report
Category Upstream Bugs
Status Closed
Assigned To Daurnimator (daurnimator)
Caleb Maclennan (alerque)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description: When I upgraded the packages I received messages like:

(22/29) Generating luarocks manifest for Lua 5.2...
Making manifest for /usr/lib/luarocks/rocks-5.2/
Couldn't load rockspec for luasocket 3.0.0-1: Could not load rockspec file /usr/lib/luarocks/rocks-5.2/luasocket/3.0.0-1/luasocket-3.0.0-1.rockspec (/usr/lib/luarocks/rocks-5.2/luasocket/3.0.0-1/luasocket-3.0.0-1.rockspec: No such file or directory)

Then I found that lua52-socket was upgraded:

[2022-09-05T08:20:06+0300] [ALPM] upgraded lua52-socket (1:3.0.0-1 -> 1:3.1.0-1)

Looking in the cache:

$ tar tf /var/cache/pacman/pkg/lua52-socket-1:3.0.0-1-x86_64.pkg.tar.zst | grep rockspec
usr/lib/luarocks/rocks-5.2/luasocket/3.0.0-1/luasocket-3.0.0-1.rockspec

$ tar tf /var/cache/pacman/pkg/lua52-socket-1:3.1.0-1-x86_64.pkg.tar.zst | grep rockspec
usr/lib/luarocks/rocks-5.2/luasocket/3.1.0-1/luasocket-3.1.0-1.rockspec

So supposedly, luasocket was upgraded. luarocks-admin couldn't find the old version (since it was listed in the old manifest), and displayed an error. And probably this can be safely ignored. As such, ideally the error shouldn't be displayed.

More on it here:
https://bbs.archlinux.org/viewtopic.php?pid=2056142

That's one point. Another one, is a manifest really needed? From what I can see it's used to host a repository:
https://github.com/luarocks/luarocks/wiki/make-manifest

Which doesn't look like a common usecase.

Generating manifests was added here:

https://github.com/archlinux/svntogit-community/commit/d266f99ab6d9b5337634f56cfefb4585962e071e

For no reason apparent to me. But to make it clear I'm no Lua expert.
This task depends upon

Closed by  Buggy McBugFace (bugbot)
Saturday, 25 November 2023, 20:07 GMT
Reason for closing:  Moved
Additional comments about closing:  https://gitlab.archlinux.org/archlinux/p ackaging/packages/luarocks/issues/1
Comment by Daurnimator (daurnimator) - Sunday, 18 September 2022, 03:34 GMT
> is a manifest really needed? From what I can see it's used to host a repository: https://github.com/luarocks/luarocks/wiki/make-manifest

Yes. Otherwise `luarocks` doesn't know about lua packages installed via `pacman`. This can result in luarocks re-installing the same package as a dependency instead of using the one installed via pacman.
Comment by Daurnimator (daurnimator) - Wednesday, 05 October 2022, 04:15 GMT
I was able to replicate this on a machine by swapping back and forth between lua51-socket-1:3.0.0-1-x86_64.pkg.tar.zst and lua51-socket-1:3.1.0-1-x86_64.pkg.tar.zst.

The warning gets spat out every time:

Couldn't load rockspec for luasocket 3.1.0-1: Could not load rockspec file /usr/lib/luarocks/rocks-5.1/luasocket/3.1.0-1/luasocket-3.1.0-1.rockspec (/usr/lib/luarocks/rocks-5.1/luasocket/3.1.0-1/luasocket-3.1.0-1.rockspec: No such file or directory)

Couldn't load rockspec for luasocket 3.0.0-1: Could not load rockspec file /usr/lib/luarocks/rocks-5.1/luasocket/3.0.0-1/luasocket-3.0.0-1.rockspec (/usr/lib/luarocks/rocks-5.1/luasocket/3.0.0-1/luasocket-3.0.0-1.rockspec: No such file or directory)

This should have a bug opened upstream in luarocks
Comment by Yuri Kanivetsky (x-yuri) - Monday, 10 October 2022, 02:29 GMT

Loading...