[erlang-bugs] Reltool and code clash

Siri Hansen erlangsiri@REDACTED
Wed May 4 11:03:52 CEST 2011


Thanks Jay - this is very helpful!
/siri@REDACTED

2011/5/3 Jay Nelson <jay@REDACTED>

> I may have more info on this.  It seems to be a reltool bug. I don't have a
> simple case, but I discovered the problem using rebar in conjunction with a
> tsung installation (which doesn't use rebar and instead installs itself into
> the erlang lib directory).
>
> We customized tsung by adding protobuffs and a new module as dependencies
> of the .app file. When we use rebar to generate the app (which relies on
> reltool to do the work), reltool crashes because some dependencies in tsung
> are in the wrong directory (tsung, rather than in tsung_controller) in the
> /usr/local/lib/erlang/lib/ directory. Uninstalling tsung allows reltool to
> generate the app.
>
> To avoid this problem, we instruct reltool to ignore the apps in the erlang
> directory:
>
>      {app, tsung, [{incl_cond, exclude}]},
>      {app, tsung_recorder, [{incl_cond, exclude}]},
>      {app, tsung_controller, [{incl_cond, exclude}]}
>
> And the dependency that we created by customizing tsung gets excluded even
> though it is included explicitly as a separate app:
>
>        {app, my_shared_lib, [{incl_cond, include}]},
>
> There are two issues:
>
> 1) tsung is releasing 3 applications and I believe the module dependencies
> are incomplete or incorrect.
>     [Not an erlang issue, the tsung guys need to fix this one]
>
> 2) reltool does not handle include + exclude of an app dependency
>      [This is the simple case you need to create]
>
> To recreate the problem simply, you need 3 apps (in this case, C is an
> included application that is just a standalone library of a single module,
> whereas A and B are executable apps):
>
>  A => relies on C
>  B => relies on C
>
> Create a reltool spec that excludes A but includes B. You will find the
> release area contains C.app but no C.beam files. It doesn't matter which of
> A or B is excluded as long as the other one is included, you should see the
> same results. I am not sure, but I don't think it matters if C is listed as
> an application or as an included_application.
>
> Hope this helps! Feel free to ask more questions. We are working around it
> by just copying the beams into place as a separate step in the Makefile.
> Everything else seems to work.
>
> jay
> _______________________________________________
> erlang-bugs mailing list
> erlang-bugs@REDACTED
> http://erlang.org/mailman/listinfo/erlang-bugs
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-bugs/attachments/20110504/9e3c1367/attachment.htm>


More information about the erlang-bugs mailing list