Issue with the luarocks infra and legal-info
Hello Fran?ois,
I've discovered an issue with the luarocks package infrastructure that apparently we didn't notice during its review. The problem is that the luarocks package infrastructure makes the extract step of a lua package depend on host-luarocks.
The problem with this is that the legal-info infrastructure does run the extract step of all packages in order to extract their source code and get the license files. In the case of luarocks packages, this triggers the build of host-luarocks, itself triggering the build of host-lua and the selected lua-interpreter. But lua-interpreter is a target package, so it depends on the toolchain, so the toolchain is also built. This is rather annoying for the legal-info make target, which should be relatively quick and normally not build anything or only small things.
Is there anything that can be done to improve this? Does host-luarocks really need to depend on the target lua interpreter?
Thanks in advance for your suggestions,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
2014-03-01 16:50 GMT+01:00 Thomas Petazzoni
<[email protected]>:
Quoted 17 lines
Hello Fran?ois,
I've discovered an issue with the luarocks package infrastructure that apparently we didn't notice during its review. The problem is that the luarocks package infrastructure makes the extract step of a lua package depend on host-luarocks.
The problem with this is that the legal-info infrastructure does run the extract step of all packages in order to extract their source code and get the license files. In the case of luarocks packages, this triggers the build of host-luarocks, itself triggering the build of host-lua and the selected lua-interpreter. But lua-interpreter is a target package, so it depends on the toolchain, so the toolchain is also built. This is rather annoying for the legal-info make target, which should be relatively quick and normally not build anything or only small things.
Quoted 3 lines
Is there anything that can be done to improve this? Does host-luarocks really need to depend on the target lua interpreter?
Before the Luarocks infrastructure, only native Lua modules have an explicit dependency with luainterpreter.
With the Luarocks infrastructure, all Lua modules need an implicit dependency with luainterpreter (we don't need to split native and pure Lua module cases).
These is done in 2 places :
in http://git.buildroot.net/buildroot/tree/package/pkg-luarocks.mk#n44 with
$(2)_DEPENDENCIES += host-luarocks luainterpreter
in http://git.buildroot.net/buildroot/tree/package/luarocks/luarocks.mk#n12
HOST_LUAROCKS_DEPENDENCIES = host-lua luainterpreter
The good place is the first one. So, you could write :
HOST_LUAROCKS_DEPENDENCIES = host-lua
and perhaps soon with the first virtual host package :
HOST_LUAROCKS_DEPENDENCIES = host-luainterpreter
Fran?ois
Quoted 7 lines
Thanks in advance for your suggestions,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
Dear Fran?ois Perrad,
Quoted 5 lines · Fran?ois Perrad
Before the Luarocks infrastructure, only native Lua modules have an explicit dependency with luainterpreter.
With the Luarocks infrastructure, all Lua modules need an implicit dependency with luainterpreter (we don't need to split native and pure Lua module cases).
Right, but most likely this dependency on the target Lua interpreter is only need before *building* Lua modules, not before *extracting* Lua modules. Which is, if I understood correctly, what you propose below.
Quoted 10 lines
These is done in 2 places :
in http://git.buildroot.net/buildroot/tree/package/pkg-luarocks.mk#n44 with$(2)_DEPENDENCIES += host-luarocks luainterpreterin http://git.buildroot.net/buildroot/tree/package/luarocks/luarocks.mk#n12
HOST_LUAROCKS_DEPENDENCIES= host-lua luainterpreterThe good place is the first one. So, you could write :
HOST_LUAROCKS_DEPENDENCIES= host-lua
and perhaps soon with the first virtual host package :
HOST_LUAROCKS_DEPENDENCIES= host-luainterpreter
Right. It's still a bit annoying to have to build host-luarocks and host-lua to do 'make legal-info', but it's certainly a lot more reasonable that having to build the toolchain :-)
Could you integrate a patch that does this simplification in the next version of your Lua improvements?
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com