Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] Issue with the luarocks infra and legal-info
@ 2014-03-01 15:50 Thomas Petazzoni
  2014-03-01 18:23 ` [Buildroot] [UNSURE]Issue " François Perrad
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Petazzoni @ 2014-03-01 15:50 UTC (permalink / raw)
  To: buildroot

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
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Buildroot] [UNSURE]Issue with the luarocks infra and legal-info
  2014-03-01 15:50 [Buildroot] Issue with the luarocks infra and legal-info Thomas Petazzoni
@ 2014-03-01 18:23 ` François Perrad
  2014-03-01 18:41   ` Thomas Petazzoni
  0 siblings, 1 reply; 3+ messages in thread
From: François Perrad @ 2014-03-01 18:23 UTC (permalink / raw)
  To: buildroot

2014-03-01 16:50 GMT+01:00 Thomas Petazzoni
<thomas.petazzoni@free-electrons.com>:
> 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?
>

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

> Thanks in advance for your suggestions,
>
> Thomas
> --
> Thomas Petazzoni, CTO, Free Electrons
> Embedded Linux, Kernel and Android engineering
> http://free-electrons.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Buildroot] [UNSURE]Issue with the luarocks infra and legal-info
  2014-03-01 18:23 ` [Buildroot] [UNSURE]Issue " François Perrad
@ 2014-03-01 18:41   ` Thomas Petazzoni
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Petazzoni @ 2014-03-01 18:41 UTC (permalink / raw)
  To: buildroot

Dear Fran?ois Perrad,

On Sat, 1 Mar 2014 19:23:56 +0100, Fran?ois Perrad wrote:

> 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.

> 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

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
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-03-01 18:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-01 15:50 [Buildroot] Issue with the luarocks infra and legal-info Thomas Petazzoni
2014-03-01 18:23 ` [Buildroot] [UNSURE]Issue " François Perrad
2014-03-01 18:41   ` Thomas Petazzoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox