[erlang-questions] use only parts of a release

Per Melin per.melin@REDACTED
Fri Apr 22 13:50:42 CEST 2011


On Fri, Apr 22, 2011 at 1:25 PM, Pablo Platt <pablo.platt@REDACTED> wrote:
> I've removed some of the apps because I didn't understand why the release
> includes apps such as mnesia and wx although I don't use them.

OK, then I misunderstood you. I though you were excluding some of your
own apps, not OTP apps.

Mnesia, wx etc are included because rebar uses reltool, and reltool
tries to figure out which modules you need. It sees that you use
stdlib, and somewhere in stdlib there is a call to e.g. mnesia. So it
has to include mnesia unless you tell it different.

You can specify apps that you don't want in rel/reltool.config. Inside
the list of {sys, […]} add {app, mnesia, [{incl_cond, exclude} to
leave it out of the release.

> init:get_argument(root) when running the generated release gives me
> {ok,[["/home/user/myserver/rel/myserver"]]}
> after installing the deb package on the second machine I'm getting:
> {ok,[["/usr/local/lib/erlang"]]}

So there is something wrong with your start script. You are not
actually running your release at all. I assume init:get_argument(boot)
(note, "boot" not "root" this time) returns an error? That would mean
that your release's boot file was not given as an argument when the VM
was started.



More information about the erlang-questions mailing list