From 0d437e4a7d1d4890111f3ba29e45ffc3137232ff Mon Sep 17 00:00:00 2001
From: Siri Hansen
Date: Tue, 22 Nov 2011 16:45:05 +0100
Subject: Fix release_handler:upgrade_app and downgrade_app when upgrading
emulator
Changes to the mechanism for upgrading the emulator in OTP R15 was
erronously not handled in release_handler:upgrade_app, downgrade_app,
upgrade_script and downgrade_script. This has been corrected,
including test and documentation.
---
lib/sasl/doc/src/release_handler.xml | 30 ++++++++++++++++++++++--------
1 file changed, 22 insertions(+), 8 deletions(-)
(limited to 'lib/sasl/doc')
diff --git a/lib/sasl/doc/src/release_handler.xml b/lib/sasl/doc/src/release_handler.xml
index 7f32100d4b..bd4a513750 100644
--- a/lib/sasl/doc/src/release_handler.xml
+++ b/lib/sasl/doc/src/release_handler.xml
@@ -492,7 +492,7 @@ release_handler:set_unpacked(RelFile, [{myapp,"1.0","/home/user"},...]).
- upgrade_app(App, Dir) -> {ok, Unpurged} | restart_new_emulator | {error, Reason}
+ upgrade_app(App, Dir) -> {ok, Unpurged} | restart_emulator | {error, Reason}
Upgrade to a new application version
App = atom()
@@ -521,14 +521,21 @@ release_handler:set_unpacked(RelFile, [{myapp,"1.0","/home/user"},...]).
does.
Returns {ok, Unpurged} if evaluating the script is
successful, where Unpurged is a list of unpurged
- modules, or restart_new_emulator if this instruction is
+ modules, or restart_emulator if this instruction is
encountered in the script, or {error, Reason} if
an error occurred when finding or evaluating the script.
+ If the restart_new_emulator instruction is found in
+ the script, upgrade_app/2 will return
+ {error,restart_new_emulator}. The reason for this is
+ that this instruction requires that a new version of the
+ emulator is started before the rest of the upgrade
+ instructions can be executed, and this can only be done by
+ install_release/1,2.
downgrade_app(App, Dir) ->
- downgrade_app(App, OldVsn, Dir) -> {ok, Unpurged} | restart_new_emulator | {error, Reason}
+ downgrade_app(App, OldVsn, Dir) -> {ok, Unpurged} | restart_emulator | {error, Reason}
Downgrade to a previous application version
App = atom()
@@ -562,7 +569,7 @@ release_handler:set_unpacked(RelFile, [{myapp,"1.0","/home/user"},...]).
does.
Returns {ok, Unpurged} if evaluating the script is
successful, where Unpurged is a list of unpurged
- modules, or restart_new_emulator if this instruction is
+ modules, or restart_emulator if this instruction is
encountered in the script, or {error, Reason} if
an error occurred when finding or evaluating the script.
@@ -638,7 +645,7 @@ release_handler:set_unpacked(RelFile, [{myapp,"1.0","/home/user"},...]).
- eval_appup_script(App, ToVsn, ToDir, Script) -> {ok, Unpurged} | restart_new_emulator | {error, Reason}
+ eval_appup_script(App, ToVsn, ToDir, Script) -> {ok, Unpurged} | restart_emulator | {error, Reason}
Evaluate an application upgrade or downgrade script
App = atom()
@@ -651,8 +658,8 @@ release_handler:set_unpacked(RelFile, [{myapp,"1.0","/home/user"},...]).
Evaluates an application upgrade or downgrade script
Script, the result from calling
- upgrade_app/2 or
- downgrade_app/2,3,
+ upgrade_script/2 or
+ downgrade_script/3,
exactly in the same way as
install_release/1,2
does.
@@ -663,9 +670,16 @@ release_handler:set_unpacked(RelFile, [{myapp,"1.0","/home/user"},...]).
.appup files should be located under Dir/ebin.
Returns {ok, Unpurged} if evaluating the script is
successful, where Unpurged is a list of unpurged
- modules, or restart_new_emulator if this instruction is
+ modules, or restart_emulator if this instruction is
encountered in the script, or {error, Reason} if
an error occurred when evaluating the script.
+ If the restart_new_emulator instruction is found in
+ the script, eval_appup_script/4 will return
+ {error,restart_new_emulator}. The reason for this is
+ that this instruction requires that a new version of the
+ emulator is started before the rest of the upgrade
+ instructions can be executed, and this can only be done by
+ install_release/1,2.
--
cgit v1.2.3