[erlang-questions] use only parts of a release

Ulf Wiger ulf.wiger@REDACTED
Sat Apr 23 21:27:03 CEST 2011

I will admit that I haven't been following this thread - apologies. Also, I have yet to update my old knowledge of how to do this to understand how it's done using reltool et al.

You can use a releases/ directory outside the OTP root. 

When you build the boot script, use the {variables, Vars} option, and when starting, define the variables using the -boot_var command-line option.


E.g. {variables, [{"MYROOT", PathToMyRoot}, {"OTP_ROOT", ERL_TOP}]}

init:get_argument(root) should point to the place where you have your .rel and .boot files etc. This can be entirely separate from where you keep your lib/ roots.


chapter 1.4, can be a good place to read up on how to get Erlang started with full control over the various variables. Perhaps also:


Ulf W

On 23 Apr 2011, at 19:21, Per Melin wrote:

> On Sat, Apr 23, 2011 at 4:41 PM, Pablo Platt <pablo.platt@REDACTED> wrote:
>> Again, the errors I'm getting are:
>> 1. Error when trying to use release_handler:unpack_release("myserver_2"):
>> {error,{enoent,"/usr/lib/myserver/releases/myserver_2.rel"}}
>> 2. After I copy myserver_2.rel manually to /usr/lib/myserver/releases and
>> trying release_handler:unpack_release("myserver_2") again I'm getting:
>> {error,{{case_clause,{error,eacces}},
>>         [{release_handler,extract_tar,2},
>>          {release_handler,do_unpack_release,4},
>>          {release_handler,handle_call,3},
>>          {gen_server,handle_msg,5},
>>          {proc_lib,init_p_do_apply,3}]}}
> Pablo and I went off-list for a while. I'll recap what we discovered.
> release_handler uses init:get_argument(root) as the base directory for
> some of its operations. When ERTS is included (which it probably must
> be) in the release that is not a problem, but since it was not
> included here and beam was started from the standard installation, the
> root is /usr/local/lib/erlang.
> As far as I can tell, release_handler doesn't seem to deal well with a
> release directory that is outside of $OTP_ROOT. There is a SASL
> environment variable called releases_dir which release_handler
> sometimes honors, and sometimes ignores (if I'm reading it right).
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions

Ulf Wiger, CTO, Erlang Solutions, Ltd.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20110423/1d4a6bf4/attachment.htm>

More information about the erlang-questions mailing list