aboutsummaryrefslogtreecommitdiffstats
path: root/lib/sasl
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sasl')
-rw-r--r--lib/sasl/doc/src/alarm_handler.xml2
-rw-r--r--lib/sasl/doc/src/appup.xml12
-rw-r--r--lib/sasl/doc/src/notes.xml33
-rw-r--r--lib/sasl/doc/src/part_notes_history.xml2
-rw-r--r--lib/sasl/doc/src/rel.xml2
-rw-r--r--lib/sasl/doc/src/relup.xml2
-rw-r--r--lib/sasl/doc/src/script.xml2
-rw-r--r--lib/sasl/doc/src/systools.xml2
-rw-r--r--lib/sasl/src/systools_rc.erl28
-rw-r--r--lib/sasl/src/systools_relup.erl6
-rw-r--r--lib/sasl/vsn.mk2
11 files changed, 74 insertions, 19 deletions
diff --git a/lib/sasl/doc/src/alarm_handler.xml b/lib/sasl/doc/src/alarm_handler.xml
index e4501ce5f0..87be6d2a9e 100644
--- a/lib/sasl/doc/src/alarm_handler.xml
+++ b/lib/sasl/doc/src/alarm_handler.xml
@@ -5,7 +5,7 @@
<header>
<copyright>
<year>1996</year>
- <year>2007</year>
+ <year>2011</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/sasl/doc/src/appup.xml b/lib/sasl/doc/src/appup.xml
index 5182889710..89bcf23b5e 100644
--- a/lib/sasl/doc/src/appup.xml
+++ b/lib/sasl/doc/src/appup.xml
@@ -4,7 +4,7 @@
<fileref>
<header>
<copyright>
- <year>1997</year><year>2009</year>
+ <year>1997</year><year>2011</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -174,11 +174,19 @@
<c>remove</c> and <c>purge</c>.</p>
<pre>
{add_application, Application}
+{add_application, Application, Type}
Application = atom()
+ Type = permanent | transient | temporary | load | none
</pre>
<p>Adding an application means that the modules defined by
the <c>modules</c> key in the <c>.app</c> file are loaded using
- <c>add_module</c>, then the application is started.</p>
+ <c>add_module</c>.</p>
+ <p><c>Type</c> defaults to <c>permanent</c> and specifies the start type
+ of the application. If <c>Type = permanent | transient | temporary</c>,
+ the application will be loaded and started in the corresponding way,
+ see <c>application(3)</c>. If <c>Type = load</c>, the application will
+ only be loaded. If <c>Type = none</c>, the application will be neither
+ loaded nor started, although the code for its modules will be loaded.</p>
<pre>
{remove_application, Application}
Application = atom()
diff --git a/lib/sasl/doc/src/notes.xml b/lib/sasl/doc/src/notes.xml
index e528af2522..7941e371a0 100644
--- a/lib/sasl/doc/src/notes.xml
+++ b/lib/sasl/doc/src/notes.xml
@@ -30,6 +30,39 @@
</header>
<p>This document describes the changes made to the SASL application.</p>
+<section><title>SASL 2.1.9.3</title>
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Honor start type in .rel files when building relup files</p>
+ <p>
+ 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.</p>
+ <p>
+ 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.</p>
+ <p>
+ 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).</p>
+ <p>
+ Own Id: OTP-9097</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
<section><title>SASL 2.1.9.2</title>
<section><title>Fixed Bugs and Malfunctions</title>
diff --git a/lib/sasl/doc/src/part_notes_history.xml b/lib/sasl/doc/src/part_notes_history.xml
index 2726d73684..d8d48bfd46 100644
--- a/lib/sasl/doc/src/part_notes_history.xml
+++ b/lib/sasl/doc/src/part_notes_history.xml
@@ -5,7 +5,7 @@
<header>
<copyright>
<year>2006</year>
- <year>2007</year>
+ <year>2011</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/sasl/doc/src/rel.xml b/lib/sasl/doc/src/rel.xml
index 108f5e7f3e..470adf3c03 100644
--- a/lib/sasl/doc/src/rel.xml
+++ b/lib/sasl/doc/src/rel.xml
@@ -5,7 +5,7 @@
<header>
<copyright>
<year>1997</year>
- <year>2007</year>
+ <year>2011</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/sasl/doc/src/relup.xml b/lib/sasl/doc/src/relup.xml
index f7d9fcdd42..7aba7e58ba 100644
--- a/lib/sasl/doc/src/relup.xml
+++ b/lib/sasl/doc/src/relup.xml
@@ -5,7 +5,7 @@
<header>
<copyright>
<year>1997</year>
- <year>2007</year>
+ <year>2011</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/sasl/doc/src/script.xml b/lib/sasl/doc/src/script.xml
index 6bac07d106..17cc64f08e 100644
--- a/lib/sasl/doc/src/script.xml
+++ b/lib/sasl/doc/src/script.xml
@@ -5,7 +5,7 @@
<header>
<copyright>
<year>1997</year>
- <year>2007</year>
+ <year>2011</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/sasl/doc/src/systools.xml b/lib/sasl/doc/src/systools.xml
index 296553bb12..e28cd25f27 100644
--- a/lib/sasl/doc/src/systools.xml
+++ b/lib/sasl/doc/src/systools.xml
@@ -5,7 +5,7 @@
<header>
<copyright>
<year>1996</year>
- <year>2007</year>
+ <year>2011</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/sasl/src/systools_rc.erl b/lib/sasl/src/systools_rc.erl
index 23d1a52b66..daadb79967 100644
--- a/lib/sasl/src/systools_rc.erl
+++ b/lib/sasl/src/systools_rc.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2009. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2011. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -34,7 +34,7 @@
%% {add_module, Mod, [Mod]}
%% {remove_module, Mod, PrePurge, PostPurge, [Mod]}
%% {restart_application, Appl}
-%% {add_application, Appl}
+%% {add_application, Appl, Type}
%% {remove_application, Appl}
%%
%% Low-level
@@ -109,6 +109,8 @@ expand_script([I|Script]) ->
{delete_module, Mod} ->
[{remove, {Mod, brutal_purge, brutal_purge}},
{purge, [Mod]}];
+ {add_application, Application} ->
+ {add_application, Application, permanent};
_ ->
I
end,
@@ -317,14 +319,18 @@ translate_independent_instrs(Before, After, Appls, PreAppls) ->
translate_application_instrs(Script, Appls, PreAppls) ->
%% io:format("Appls ~n~p~n",[Appls]),
L = lists:map(
- fun({add_application, Appl}) ->
+ fun({add_application, Appl, Type}) ->
case lists:keysearch(Appl, #application.name, Appls) of
{value, Application} ->
Mods =
remove_vsn(Application#application.modules),
+ ApplyL = case Type of
+ none -> [];
+ load -> [{apply, {application, load, [Appl]}}];
+ _ -> [{apply, {application, start, [Appl, Type]}}]
+ end,
[{add_module, M, []} || M <- Mods] ++
- [{apply, {application, start,
- [Appl, permanent]}}];
+ ApplyL;
false ->
throw({error, {no_such_application, Appl}})
end;
@@ -750,8 +756,9 @@ check_op({remove_module, Mod, PrePurge, PostPurge, Mods}) ->
lists:foreach(fun(M) -> check_mod(M) end, Mods);
check_op({remove_application, Appl}) ->
check_appl(Appl);
-check_op({add_application, Appl}) ->
- check_appl(Appl);
+check_op({add_application, Appl, Type}) ->
+ check_appl(Appl),
+ check_start_type(Type);
check_op({restart_application, Appl}) ->
check_appl(Appl);
check_op(restart) -> ok;
@@ -839,6 +846,13 @@ check_node(Node) -> throw({error, {bad_node, Node}}).
check_appl(Appl) when is_atom(Appl) -> ok;
check_appl(Appl) -> throw({error, {bad_application, Appl}}).
+check_start_type(none) -> ok;
+check_start_type(load) -> ok;
+check_start_type(temporary) -> ok;
+check_start_type(transient) -> ok;
+check_start_type(permanent) -> ok;
+check_start_type(T) -> throw({error, {bad_start_type, T}}).
+
check_func(Func) when is_atom(Func) -> ok;
check_func(Func) -> throw({error, {bad_func, Func}}).
diff --git a/lib/sasl/src/systools_relup.erl b/lib/sasl/src/systools_relup.erl
index 177d50be80..6b0f77703e 100644
--- a/lib/sasl/src/systools_relup.erl
+++ b/lib/sasl/src/systools_relup.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2009. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2011. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -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}.
diff --git a/lib/sasl/vsn.mk b/lib/sasl/vsn.mk
index d01a9bc4f1..8112d145dd 100644
--- a/lib/sasl/vsn.mk
+++ b/lib/sasl/vsn.mk
@@ -1 +1 @@
-SASL_VSN = 2.1.9.2
+SASL_VSN = 2.1.9.3