diff options
author | Juan Jose Comellas <[email protected]> | 2012-01-13 10:17:34 -0300 |
---|---|---|
committer | Juan Jose Comellas <[email protected]> | 2012-01-13 10:17:34 -0300 |
commit | 700e7ee884e3ae19a43a05e8a24f90ab703e6890 (patch) | |
tree | 8a87f76170eb0b6984ea9c6e3ddc465082b7b578 /lib | |
parent | d8ca0eb6de482a9a4bb5d67bc33232352c3ec83e (diff) | |
download | otp-700e7ee884e3ae19a43a05e8a24f90ab703e6890.tar.gz otp-700e7ee884e3ae19a43a05e8a24f90ab703e6890.tar.bz2 otp-700e7ee884e3ae19a43a05e8a24f90ab703e6890.zip |
Avoid creating an undefined start_phases entry when generating a release
When a release is generated and the applications in the release do not
define a value for the start_phases entry of their .app files, reltool
will generate the following entry in the .app files of the release:
{start_phases, undefined}
If this happens, when trying to create a release upgrade systools will
fail because it doesn't allow the start_phases entry to be set to
undefined. This patch avoids this situation by not generating a
start_phases entry when it is set to undefined.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/reltool/src/reltool_target.erl | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/lib/reltool/src/reltool_target.erl b/lib/reltool/src/reltool_target.erl index 0fcf89a360..648978bd01 100644 --- a/lib/reltool/src/reltool_target.erl +++ b/lib/reltool/src/reltool_target.erl @@ -247,10 +247,15 @@ gen_app(#app{name = Name, env = Env, mod = StartMod, start_phases = StartPhases}}) -> - StartMod2 = - case StartMod =:= undefined of - true -> []; - false -> [{mod, StartMod}] + StartPhases2 = + case StartPhases of + undefined -> []; + _ -> [{start_phases, StartPhases}] + end, + Tail = + case StartMod of + undefined -> StartPhases2; + _ -> [{mod, StartMod} | StartPhases2] end, {application, Name, [{description, Desc}, @@ -261,10 +266,9 @@ gen_app(#app{name = Name, {applications, ReqApps}, {included_applications, InclApps}, {env, Env}, - {start_phases, StartPhases}, {maxT, MaxT}, {maxP, MaxP} | - StartMod2]}. + Tail]}. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Generate the contents of a rel file |