On Tue, Dec 14, 2010 at 20:52, Alexander Gladysh <[email protected]> wrote:
> On Tue, Dec 14, 2010 at 17:20, Hisham <[email protected]> wrote:
>> On Mon, Dec 13, 2010 at 12:03 AM, Alexander Gladysh <[email protected]> 
>> wrote:

>>> I've got a set of lua-only rockspecs which use build "none" or
>>> "builtin" with mix of copy_directories and install.bin clauses. (Maybe
>>> something else, but only build modes are none and builtin only.)

>>> To determine if I should rebuild a rock, I need a quick and dirty way
>>> to get a list of files which would get into rock file if I'd say
>>> `luarocks make` on that rockspec.

>>> Note that the list should come with resolved symlinks.

>>> Any clues? Can I reuse LuaRocks code for that somehow?

>> As far as I remember, that information is not available in advance in
>> LuaRocks. It is inferrable for these build types, but there's no quick
>> and dirty way available now. After build, you can check the
>> rock_manifest file for each rock.

> But the whole point is to avoid building the rock.

> OK, I guess I have to code something here from scratch. I can do it in
> my own ecosystem as a closed source, or I can do it in some
> LuaRocks-friendly way and opensource it. If someone would tell me what
> is the LuaRocks-friendly way in this case.

Done.

https://github.com/lua-aplicado/lua-aplicado/blob/61d2399a9366c6dbb2853ae88d7693888dc7a9aa/lua-aplicado/shell/luarocks.lua#L213-281

Credit goes to my colleague, Vladimir Fedin. Code is under MIT.

Can someone knowledgeable in the LR internals please look at it and
tell, if we missed something?

We cheated: we just check if any string in build table is a file or
directory name, and if it is, we add it to the list.

Alexander.

_______________________________________________
Luarocks-developers mailing list
[email protected]
http://lists.luaforge.net/cgi-bin/mailman/listinfo/luarocks-developers

Reply via email to