<div dir="ltr">Hi Shino, <div><br></div><div>release_handler is not explicitly "slim-release aware", since this is a reltool mechanism. (And also, it is only experimental.)</div><div>I think, however, that you can solve your problem by unpacking your tar file manually and then using release_handler:set_unpacked/2 instead of release_handler:unpack_release/1.</div>
<div><br></div><div>/siri</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/11/5 Shunichi Shinohara <span dir="ltr"><<a href="mailto:shino.shun@gmail.com" target="_blank">shino.shun@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I try to make rebar work with slim release at<br>
<a href="https://github.com/rebar/rebar/pull/52" target="_blank">https://github.com/rebar/rebar/pull/52</a> .<br>
Almost all goes well, but in upgrading in slim release environment<br>
an error occurs and fails. (R16B02, Linux)<br>
<br>
To simplify step to reproduce, I created repository which has<br>
rebar binary and some configuration files.<br>
<a href="https://github.com/shino/slim-upgrade-sample" target="_blank">https://github.com/shino/slim-upgrade-sample</a><br>
<br>
Steps to reproduce:<br>
0. Clone the repository and cd to it.<br>
   git clone <a href="https://github.com/shino/slim-upgrade-sample.git" target="_blank">https://github.com/shino/slim-upgrade-sample.git</a><br>
1. Generate version 1 and 2 of releases and upgrade package between<br>
   them. The script generate.sh in the repo does this work.<br>
2. Boot the node with release version 1 and try to unpack the upgrade<br>
   package.<br>
3. The following error occurs.<br>
  > release_handler:unpack_release("sample_2").<br>
  {error,{enoent,<br>
   "/opt/shino/scm/slim-upgrade-sample/sample/rel/sample_1/releases/sample_2.rel"}}<br>
<br>
"/opt/shino/scm/slim-upgrade-sample/sample/rel/sample_1/" is root directory<br>
of slim release generated by reltool.<br>
The file "sample_2.rel" which release_handler complains not-found goes<br>
under the "releases" directory of Erlang/OTP which execute the node.<br>
Quick look of source code, release_handler seems to assume "releases" directory<br>
exists just under root directory (it's appropriate for normal,<br>
non-slim release).<br>
<br>
- extract_rel_file/2: Extract rel file in tar ball under root directory.<br>
  <a href="https://github.com/erlang/otp/blob/OTP_R16B02/lib/sasl/src/release_handler.erl#L835" target="_blank">https://github.com/erlang/otp/blob/OTP_R16B02/lib/sasl/src/release_handler.erl#L835</a><br>
- check_rel/3,4: Try rel file under releases directory of slim release.<br>
  <a href="https://github.com/erlang/otp/blob/OTP_R16B02/lib/sasl/src/release_handler.erl#L836" target="_blank">https://github.com/erlang/otp/blob/OTP_R16B02/lib/sasl/src/release_handler.erl#L836</a><br>
<br>
P.S.<br>
Sorry that steps to reproduce contain non-OTP, rebar related things.<br>
I hope rebar is not related the error because of release_handler's code above.<br>
<br>
Best Regards,<br>
Shino<br>
_______________________________________________<br>
erlang-bugs mailing list<br>
<a href="mailto:erlang-bugs@erlang.org">erlang-bugs@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-bugs" target="_blank">http://erlang.org/mailman/listinfo/erlang-bugs</a><br>
</blockquote></div><br></div>