On Mon, Sep 10, 2012 at 4:50 PM, Alexander Gladysh <[email protected]> wrote:
> On Mon, Sep 10, 2012 at 11:25 PM, Hisham <[email protected]> wrote:
>
>> Users already complained about this behavior:
>> https://github.com/keplerproject/luarocks/pull/89
>
> Note that this patch is for another use-case. Not system and local
> (i.e. user's) tree, but two-level system tree hierarchy.
>
> That is, specifically, trees in /usr/ and /usr/local/. A rocks in
> /usr/ can not have dependencies in /usr/local. If we need to add
> protection that ensures that case to the patch, we'll do that (seems a
> good idea). If you have hints on implementation, please share.
One possibility would be to check which local tree is being used (the
default, set with --local or --tree, or equivalent config options) and
then merge in the manifest list all trees "up to the current one" --
right now I don't remember the evaluation order, so maybe this
traversal should work backwards. So, with a rocks_trees = {
home.."./luarocks", "/usr/local", "/usr" }, when using
--tree=/usr/local, it should merge /usr/local and /usr, when using
--tree=/usr it should use /usr only, and with --local it should use
all three.
I am usually a fan of these "figure out the right thing to do"
solutions, but my experience is that the too-magical behavior often
confuses users (even when users are developers, as is the case in the
LR world), so I've been bitten by doing stuff like that and ended up
having to go back to simpler, more explicit approach. So I'm not sure
if this approach is the best, but that's the first idea that came to
my mind.
-- Hisham
------------------------------------------------------------------------------
Got visibility?
Most devs has no idea what their production app looks like.
Find out how fast your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219671;13503038;y?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
_______________________________________________
Luarocks-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/luarocks-developers