build(update_appup): handle add_module instruction
This commit is contained in:
parent
d0b5b262fe
commit
3b22efeb9c
|
@ -328,13 +328,18 @@ do_merge_update_actions(App, {New0, Changed0, Deleted0}, OldActions) ->
|
||||||
New = New0 -- AlreadyHandled,
|
New = New0 -- AlreadyHandled,
|
||||||
Changed = Changed0 -- AlreadyHandled,
|
Changed = Changed0 -- AlreadyHandled,
|
||||||
Deleted = Deleted0 -- AlreadyHandled,
|
Deleted = Deleted0 -- AlreadyHandled,
|
||||||
Reloads = [{load_module, M, brutal_purge, soft_purge, []}
|
Actions =
|
||||||
|| not contains_restart_application(App, OldActions),
|
case contains_restart_application(App, OldActions) of
|
||||||
M <- Changed ++ New],
|
true ->
|
||||||
|
[];
|
||||||
|
false ->
|
||||||
|
[{load_module, M, brutal_purge, soft_purge, []} || M <- Changed] ++
|
||||||
|
[{add_module, M} || M <- New]
|
||||||
|
end,
|
||||||
{OldActionsWithStop, OldActionsAfterStop} =
|
{OldActionsWithStop, OldActionsAfterStop} =
|
||||||
find_application_stop_instruction(App, OldActions),
|
find_application_stop_instruction(App, OldActions),
|
||||||
OldActionsWithStop ++
|
OldActionsWithStop ++
|
||||||
Reloads ++
|
Actions ++
|
||||||
OldActionsAfterStop ++
|
OldActionsAfterStop ++
|
||||||
[{delete_module, M} || M <- Deleted] ++
|
[{delete_module, M} || M <- Deleted] ++
|
||||||
AppSpecific.
|
AppSpecific.
|
||||||
|
@ -365,6 +370,8 @@ find_application_stop_instruction(Application, Actions) ->
|
||||||
%% already handled
|
%% already handled
|
||||||
process_old_action({purge, Modules}) ->
|
process_old_action({purge, Modules}) ->
|
||||||
Modules;
|
Modules;
|
||||||
|
process_old_action({add_module, Module}) ->
|
||||||
|
[Module];
|
||||||
process_old_action({delete_module, Module}) ->
|
process_old_action({delete_module, Module}) ->
|
||||||
[Module];
|
[Module];
|
||||||
process_old_action(LoadModule) when is_tuple(LoadModule) andalso
|
process_old_action(LoadModule) when is_tuple(LoadModule) andalso
|
||||||
|
|
Loading…
Reference in New Issue