[erlang-questions] use only parts of a release

Per Melin per.melin@REDACTED
Sat Apr 23 19:21:30 CEST 2011

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).

More information about the erlang-questions mailing list