On Oct 28, 2010, at 10:24 AM, steve donovan wrote:

> On Thu, Oct 28, 2010 at 4:21 PM, Doug Currie <[email protected]> wrote:
>> It doesn't happen in rocks I installed without wrocks; I suspect the extra 
>> newline could muck with luarocks hash checking.
> 
> It will in fact be a Lua syntax error and cause a failure to
> load...one check could be to get rid of the newlines and see if it
> works ok
> 
> But how my dog managed this trick, without being taught at all about
> rock_manifest files is beyond me currently....

The culprit seems to be function get_md5 in fs/unix/tools.lua (in my case 
openssl is used):

Lua 5.1.4  Copyright (C) 1994-2008 Lua.org, PUC-Rio
> file = "lxp.so"
> pipe = io.popen("openssl md5 "..file)
>       computed = pipe:read("*a")
>       pipe:close()
>       if computed then
>>          computed = computed:sub(-32)
>>       end
> =computed
4c58b3c6960b18ec1d635f321a2bf4a

> 

I noticed that in fs/win32/tools.lua read("*l") is used instead of read("*a")

> pipe = io.popen("openssl md5 "..file)
> computed = pipe:read("*l")
> pipe:close()
> if computed then
>> computed = computed:sub(-32)
>> end
> =computed
44c58b3c6960b18ec1d635f321a2bf4a
> 


e


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

Reply via email to