build(appup): fix module delete instructions

when there is a application_restart instruction, there is no
need to add module delete instructions
This commit is contained in:
Zaiming (Stone) Shi 2022-03-09 11:18:02 +01:00
parent ca5637b4a3
commit cedeff4dab
1 changed files with 8 additions and 2 deletions

View File

@ -272,8 +272,9 @@ do_merge_update_actions(App, {New0, Changed0, Deleted0}, OldActions) ->
New = New0 -- AlreadyHandled,
Changed = Changed0 -- AlreadyHandled,
Deleted = Deleted0 -- AlreadyHandled,
HasRestart = contains_restart_application(App, OldActions),
Actions =
case contains_restart_application(App, OldActions) of
case HasRestart of
true ->
[];
false ->
@ -285,7 +286,12 @@ do_merge_update_actions(App, {New0, Changed0, Deleted0}, OldActions) ->
OldActionsWithStop ++
Actions ++
OldActionsAfterStop ++
[{delete_module, M} || M <- Deleted] ++
case HasRestart of
true ->
[];
false ->
[{delete_module, M} || M <- Deleted]
end ++
AppSpecific.
%% If an entry restarts an application, there's no need to use