On 16 Mar, 2013, at 17:00 , steve donovan <steve.j.dono...@gmail.com> wrote:

> On Sat, Mar 16, 2013 at 5:38 PM, Gary V. Vaughan <g...@vaughan.pe> wrote:
>> It would be really cool if Luarocks had some facility for virtual 
>> dependencies,
>> so that, for example, both lyaml and luaYAML could satisfy a yaml dependency,
> 
> It's indeed a useful concept, and time to think about how the next
> rockspec version can support it.

In LuaDist there is a "provides" table that basically does this. For example 
LuaJIT2 provides "lua-5.1.5" so when LuaJIT2 is installed all dependencies 
against lua-5.1.5 are satisfied. The concept applies for virtual dependencies 
as the provided package may not even exist.  LuaDist will even list the 
provided packages and display what packages provide the functionality.

Eg.
$ ./luadist _jit list

Installed modules:
==================

  lua-5.1.5     (Darwin-x86_64)  [provided by luajit-2.0.0-beta10]
  luajit-2.0.0-beta10   (Darwin-x86_64)

the dist.info (rockspec equivalent) just contains:

provides = {
        "lua-5.1.5",
}

> My understanding is that if you already have lyaml OR luaYAML then LR
> is satisfied. If neither, then pick the first one?

The above solves this problem too. If modules depend on lyaml then it will be 
the primary package to install. However if luaYAML would provide lyaml in its 
rockspec info then you can install it first and proceed with all dependencies 
intact.

pd


------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
Luarocks-developers mailing list
Luarocks-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/luarocks-developers

Reply via email to