<html><body><div style="color:#000; background-color:#fff; font-family:arial, helvetica, sans-serif;font-size:12pt"><div>Maybe rebar shouldn't include apps in the release that the release doesn't really need?</div><div>It could be insignificant.<br></div><div><br></div><div>init:get_argument(boot) gives me:<br></div><div><span>{ok,[["/usr/lib/myserver/releases/1/myserver"]]}</span></div><div><br><span></span></div><div><span>I've created the file releases/RELEASES with relative paths with:</span></div><div><span>release_handler:create_RELEASES(".", "./releases", "./releases/1/myserver.rel", []).</span></div><div><span>and now release_handler:which_releases() show reasonable output.</span></div><div><br><span></span></div><div><span>I'll try to create a new release, install it with the package and see if I can upgrade.</span></div><div><span>There will probably be problems like upstart trying to restart the erlang server instead of letting the
 release_handler take care of it.<br></span></div><div><br></div><div style="font-family: arial, helvetica, sans-serif; font-size: 12pt;"><div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"><font face="Arial" size="2"><hr size="1"><b><span style="font-weight:bold;">From:</span></b> Per Melin <per.melin@gmail.com><br><b><span style="font-weight: bold;">To:</span></b> Pablo Platt <pablo.platt@yahoo.com><br><b><span style="font-weight: bold;">Cc:</span></b> erlang-questions <erlang-questions@erlang.org><br><b><span style="font-weight: bold;">Sent:</span></b> Friday, April 22, 2011 2:50 PM<br><b><span style="font-weight: bold;">Subject:</span></b> Re: [erlang-questions] use only parts of a release<br></font><br>
On Fri, Apr 22, 2011 at 1:25 PM, Pablo Platt <<a ymailto="mailto:pablo.platt@yahoo.com" href="mailto:pablo.platt@yahoo.com">pablo.platt@yahoo.com</a>> wrote:<br>> I've removed some of the apps because I didn't understand why the release<br>> includes apps such as mnesia and wx although I don't use them.<br><br>OK, then I misunderstood you. I though you were excluding some of your<br>own apps, not OTP apps.<br><br>Mnesia, wx etc are included because rebar uses reltool, and reltool<br>tries to figure out which modules you need. It sees that you use<br>stdlib, and somewhere in stdlib there is a call to e.g. mnesia. So it<br>has to include mnesia unless you tell it different.<br><br>You can specify apps that you don't want in rel/reltool.config. Inside<br>the list of {sys, […]} add {app, mnesia, [{incl_cond, exclude} to<br>leave it out of the release.<br><br>> init:get_argument(root) when running the generated release gives me<br>>
 {ok,[["/home/user/myserver/rel/myserver"]]}<br>> after installing the deb package on the second machine I'm getting:<br>> {ok,[["/usr/local/lib/erlang"]]}<br><br>So there is something wrong with your start script. You are not<br>actually running your release at all. I assume init:get_argument(boot)<br>(note, "boot" not "root" this time) returns an error? That would mean<br>that your release's boot file was not given as an argument when the VM<br>was started.<br><br><br></div></div></div></body></html>