[erlang-questions] use only parts of a release

Pablo Platt pablo.platt@REDACTED
Fri Apr 22 14:02:30 CEST 2011

Maybe rebar shouldn't include apps in the release that the release doesn't really need?
It could be insignificant.

init:get_argument(boot) gives me:


I've created the file releases/RELEASES with relative paths with:
release_handler:create_RELEASES(".", "./releases", "./releases/1/myserver.rel", []).
and now release_handler:which_releases() show reasonable output.

I'll try to create a new release, install it with the package and see if I can upgrade.
There will probably be problems like upstart trying to restart the erlang server instead of letting the release_handler take care of it.

From: Per Melin <per.melin@REDACTED>
To: Pablo Platt <pablo.platt@REDACTED>
Cc: erlang-questions <erlang-questions@REDACTED>
Sent: Friday, April 22, 2011 2:50 PM
Subject: Re: [erlang-questions] use only parts of a release

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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20110422/d07cffc8/attachment.htm>

More information about the erlang-questions mailing list