Hi Andrew!<div><br></div><div>I finally had the time to look at this. It seems there is a bug - and a simple workaround. </div><div><br></div><div>The bug is that the code path is not at all updated unless the relup contains an instruction for at least one of the application's modules.</div>
<div><br></div><div>The workaround is to use the {update_paths,true} option to release_handler:install_release/2. The documentation for this option says:</div><div><meta http-equiv="content-type" content="text/html; charset=utf-8"><span class="Apple-style-span" style="font-family: Verdana, Arial, Helvetica, sans-serif; ">"The option <span class="code" style="font-family: courier; font-weight: normal; ">{update_paths,Bool}</span> indicates if all application code paths should be updated (<span class="code" style="font-family: courier; font-weight: normal; ">Bool==true</span>), or if only code paths for modified applications should be updated (<span class="code" style="font-family: courier; font-weight: normal; ">Bool==false</span>, default)."</span></div>
<div><span class="Apple-style-span" style="font-family: Verdana, Arial, Helvetica, sans-serif; "><br></span></div><div><span class="Apple-style-span" style="font-family: Verdana, Arial, Helvetica, sans-serif; ">Since your application is indeed updated, the path should of course have been updated anyway. I will correct this for OTP R14B04.</span></div>
<div><font class="Apple-style-span" face="Verdana, Arial, Helvetica, sans-serif"><br></font></div><div><font class="Apple-style-span" face="Verdana, Arial, Helvetica, sans-serif">Regards</font></div><div><font class="Apple-style-span" face="Verdana, Arial, Helvetica, sans-serif">/siri</font></div>
<div><font class="Apple-style-span" face="Verdana, Arial, Helvetica, sans-serif" size="3"><br></font><br><div class="gmail_quote">2011/6/20 Siri Hansen <span dir="ltr"><<a href="mailto:erlangsiri@gmail.com">erlangsiri@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi Andrew - thanks for reporting this. I will have a look at it.<div>Regards</div><div>siri@otp<br><br><div class="gmail_quote">
<div><div></div><div class="h5">2011/6/20 Andrew Gopienko <span dir="ltr"><<a href="mailto:gopienko@gmail.com" target="_blank">gopienko@gmail.com</a>></span><br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div></div><div class="h5"><span style="border-collapse:collapse;font-size:13px"><tt style="font-family:arial, sans-serif"><font color="#000000"><div>


<span style="border-collapse:collapse;font-family:arial, sans-serif;font-size:13px"><tt><font color="#000000">Hi,</font></tt></span></div><div><span style="border-collapse:collapse;font-family:arial, sans-serif;font-size:13px"><tt><font color="#000000"><br>


</font></tt></span></div>Code path of application can specify to old location after release upgrade.</font></tt><div><br><tt style="color:rgb(80, 0, 80);font-family:arial, sans-serif"><font color="#000000">It's possible if we change only vsn of application, no erlang code of</font></tt><br>


<tt style="color:rgb(80, 0, 80);font-family:arial, sans-serif"><font color="#000000">modules is changed. (In my case under priv directory I have JavaScript code).</font></tt><br><br><tt style="color:rgb(80, 0, 80);font-family:arial, sans-serif"><font color="#000000">Generated relup doesnt contains instructions for reload application...</font></tt><br>


<tt style="color:rgb(80, 0, 80);font-family:arial, sans-serif"><font color="#000000">no 'load_object_code,{OurApp,NewVsn,Mods}'.</font></tt><br><br><tt style="color:rgb(80, 0, 80);font-family:arial, sans-serif"><font color="#000000">After release upgraded we have:</font></tt><br>


<tt style="color:rgb(80, 0, 80);font-family:arial, sans-serif"><font color="#000000">application:loaded_applications() </font></tt><br><tt style="color:rgb(80, 0, 80);font-family:arial, sans-serif"><font color="#000000">....</font></tt><br>


<tt style="color:rgb(80, 0, 80);font-family:arial, sans-serif"><font color="#000000">{OurApp,Description,NewVsn}</font></tt><br><tt style="color:rgb(80, 0, 80);font-family:arial, sans-serif"><font color="#000000">....</font></tt><br>


<br><tt style="color:rgb(80, 0, 80);font-family:arial, sans-serif"><font color="#000000">but </font></tt><br><br><tt style="color:rgb(80, 0, 80);font-family:arial, sans-serif"><font color="#000000">code:priv_dir(OurApp) points to old location.</font></tt><br>


<br><tt style="color:rgb(80, 0, 80);font-family:arial, sans-serif"><font color="#000000">If relup contains {OurApp,NewVsn,[]} then location of application is </font></tt><tt style="color:rgb(80, 0, 80);font-family:arial, sans-serif"><font color="#000000">correctly updated.</font></tt><br>


<br><br><tt style="color:rgb(80, 0, 80);font-family:arial, sans-serif"><font color="#000000">Andrew Gopienko</font></tt><br><tt style="color:rgb(80, 0, 80);font-family:arial, sans-serif"><font color="#000000">ThreeLine LLC</font></tt></div>


<div style="font-family:arial, sans-serif;color:rgb(80, 0, 80)"><tt><font color="#000000"><br></font></tt></div></span>
<br></div></div>_______________________________________________<br>
erlang-bugs mailing list<br>
<a href="mailto:erlang-bugs@erlang.org" target="_blank">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>
<br></blockquote></div><br></div>
</blockquote></div><br></div>