Relup instructions order
Andrew Gopienko
gopienko@REDACTED
Thu Mar 10 08:39:49 CET 2011
Erlang R14B01, Ubuntu 10.10 x86 box
gproc.appup file
----------------------------------------------------
%% appup generated for gproc by rebar ("2011/03/10 13:15:09")
{"0.1.1",
[{"0.01", [{delete_module,gproc_eqc},{update,gproc,{advanced,[]}}]}],
[{"0.01", []}]
}.
relup file
-------------------------------------------------------
{"0.5.5",
[{"0.5.4",[],
[{load_object_code,{gproc,"0.1.1",[gproc]}},
point_of_no_return,
{remove,{gproc_eqc,brutal_purge,brutal_purge}},
{purge,[gproc_eqc]},
{suspend,[gproc]},
{load,{gproc,brutal_purge,brutal_purge}},
{code_change,up,[{gproc,[]}]},
{resume,[gproc]}]}],
[{"0.5.4",[],[point_of_no_return]}]}.
After evaluating instruction 'point_of_no_return' the library path updated
to new location and
instruction 'remove' crashed in call
release_handler_1:get_vsn(non_existing=code:which(gproc_eqc)).
release_handler:upgrade_app also crash with same Reason.
(flm@REDACTED)1> code:which(gproc_eqc).
"/home/tdx/devel/fleetm/rel/flm_0.5.4/lib/gproc-0.01/ebin/gproc_eqc.beam"
(flm@REDACTED)2> release_handler:upgrade_app(gproc,
"../flm/lib/gproc-0.1.1").
{'EXIT',{'EXIT',{{badmatch,{error,beam_lib,
{file_error,"non_existing.beam",enoent}}},
[{release_handler_1,get_vsn,1},
{release_handler_1,add_old_vsn,2},
{release_handler_1,eval,2},
{lists,foldl,3},
{release_handler_1,eval_script,4},
{release_handler,eval_appup_script,4},
{erl_eval,do_apply,5},
{shell,exprs,7}]}}}
(flm@REDACTED)3> code:which(gproc_eqc).
non_existing
After reordering instructions in relup and place 'remove' before
'point_of_no_return' release upgraded successfully.
More information about the erlang-bugs
mailing list