From 49d011c355682ce5cb5447c682684031dab82e8b Mon Sep 17 00:00:00 2001 From: Paul Guyot Date: Sun, 6 Jun 2010 22:26:08 +0200 Subject: Honor start type in .rel files when building relup files Previously, relup file always included an application:start(Application, permanent) apply instruction for every application that appear in the UpTo/DowFrom release file, whatever their start type in the release file. The new implementation fixes this bug by honoring the start type according to the rel(5) format. If the start type is none, no apply line is included in the relup. If the start type is load, the relup includes instruction to only load the application. Otherwise, the relup includes an instruction to start the application to the according type. The fix is implemented by adding a new parameter to the add_application high level appup instruction. This new parameter is documented in appup(5). --- lib/sasl/src/systools_relup.erl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/sasl/src/systools_relup.erl') diff --git a/lib/sasl/src/systools_relup.erl b/lib/sasl/src/systools_relup.erl index 177d50be80..71bd3ca491 100644 --- a/lib/sasl/src/systools_relup.erl +++ b/lib/sasl/src/systools_relup.erl @@ -370,10 +370,10 @@ collect_appup_scripts(_, [], _, Ws, RUs) -> {RUs, Ws}. %% ToApps = [#application] %% create_add_app_scripts(FromRel, ToRel, RU0s, W0s) -> - AddedNs = [N || {N, _V, _T} <- ToRel#release.applications, + AddedNs = [{N, T} || {N, _V, T} <- ToRel#release.applications, not lists:keymember(N, 1, FromRel#release.applications)], %% io:format("Added apps: ~p~n", [AddedNs]), - RUs = [[{add_application, N}] || N <- AddedNs], + RUs = [[{add_application, N, T}] || {N, T} <- AddedNs], {RUs ++ RU0s, W0s}. -- cgit v1.2.3