I just checked the latest code in Git and it seems to be generating
paths correctly. Please try installing this rockspec in the machine
that's not working:

https://raw.githubusercontent.com/hishamhm/datafile/master/rockspecs/datafile-scm-1.rockspec

and let me know if it fixes the issue. If it does, I'll make a new release.

Thanks!

On 9 June 2015 at 12:37, Hisham <h...@hisham.hm> wrote:
> The problem seems to be that in the second machine datafile is not
> producing the right path. It is producing
> '/home/<>/.luarocks/share/lua/5.1/loverocks/templates/love9' but not
> '/home/<>/.luarocks/share/lua/5.1/loverocks/0.0.3-1/templates/love9'.
>
> We recently modified datafile to make it stop going upwards all the
> way through the directory structure, so I suspect that your datafile
> version is _older_ and works best and the other one in _newer_ and
> it's broken. I'll take a look and update datafile if it's the case.
>
>
>
> On 9 June 2015 at 04:14, Alloyed <allo...@tfwno.gf> wrote:
>> So I'm writing an application, installable by luarocks, that needs to
>> access a number of templates at runtime. ATM I package them in with a simple
>>
>>    copy_directories = { "templates" }
>>
>> Which, when installed, has a path that looks like
>>
>>
>> $HOME/.luarocks/lib/luarocks/rocks-5.1/loverocks/0.0.3-1/templates/my-template
>>
>> Which works fine for me. I can include it pretty simply using datafile
>> to find the correct path
>>
>>  local file, path_or_err = datafile.open("templates/my-template")
>>
>> which on my machine will check in the right place (error induced)
>>
>>    no file '/home/<>/.luarocks/share/lua/5.1/templates/love9'
>>    no file '/home/<>/.luarocks/lib/lua/5.1/templates/love9'
>>    no file
>> '/home/<>/.luarocks/lib/luarocks/rocks/loverocks/0.0.3-1/templates/love9'
>>    no file
>> '/home/<>/.luarocks/lib/luarocks/rocks-5.1/loverocks/0.0.3-1/templates/love9'
>>    no file '/home/<>/.luarocks/share/lua/5.1/loverocks/templates/love9'
>>    no file '/home/<>/.luarocks/share/lua/5.1/templates/love9'
>>    no file '/home/<>/.luarocks/share/lua/templates/love9'
>>    no file '/home/<>/.luarocks/share/templates/love9'
>>    no file '/home/<>/.luarocks/templates/love9'
>>    no file '/home/<>/templates/love9'
>>    no file '/home/templates/love9'
>>    no file '/home/<>/.local/share/templates/love9'
>>    no file '/usr/local/share/templates/love9'
>>    no file '/usr/share/templates/love9'
>>
>> But, on another machine/install, datafile gives completely different
>> results!
>>
>>    no file '/home/<>/.luarocks/share/lua/5.1/templates/love9'
>>    no file '/home/<>/.luarocks/lib/lua/5.1/templates/love9'
>>    no file '/home/<>/.luarocks/share/lua/5.1/loverocks/templates/love9'
>>    no file '/home/<>/.luarocks/share/lua/5.1/templates/love9'
>>    no file '/home/<>/.luarocks/share/lua/templates/love9'
>>    no file '/home/<>/.luarocks/share/templates/love9'
>>    no file '/home/<>/.luarocks/templates/love9'
>>    no file '/home/<>/templates/love9'
>>    no file '/home/templates/love9'
>>    no file '/home/<>/.local/share/templates/love9'
>>    no file '/usr/local/share/templates/love9'
>>    no file '/usr/share/templates/love9'
>>
>> Notably, the actual path is nowhere to be found in the second set of
>> paths, and so nothing works. How would I go about debugging this
>> situation, given that the second install isn't my own? Is there a way I
>> can just ask luarocks to copy the templates to $TREE/share/lua/5.1,
>> which both installs seem to check first?
>>
>> ------------------------------------------------------------------------------
>> _______________________________________________
>> Luarocks-developers mailing list
>> Luarocks-developers@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/luarocks-developers

------------------------------------------------------------------------------
_______________________________________________
Luarocks-developers mailing list
Luarocks-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/luarocks-developers

Reply via email to