From cedeff4dab699ee2f1104272f68b24bc2614b373 Mon Sep 17 00:00:00 2001 From: "Zaiming (Stone) Shi" Date: Wed, 9 Mar 2022 11:18:02 +0100 Subject: [PATCH] build(appup): fix module delete instructions when there is a application_restart instruction, there is no need to add module delete instructions --- scripts/update_appup.escript | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/scripts/update_appup.escript b/scripts/update_appup.escript index 19b546f43..9083b62f1 100755 --- a/scripts/update_appup.escript +++ b/scripts/update_appup.escript @@ -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