aboutsummaryrefslogtreecommitdiffstats
path: root/lib/reltool/src
diff options
context:
space:
mode:
authorSiri Hansen <[email protected]>2012-09-14 16:07:18 +0200
committerSiri Hansen <[email protected]>2012-09-14 16:17:43 +0200
commit6a40b71e364fd0ac7f68bebfdd51c80f9f66730a (patch)
tree716542159f5ac210eea22713b6e7bc816e8f1452 /lib/reltool/src
parent8d74edab223477c704af62b19793f0f8282fc749 (diff)
downloadotp-6a40b71e364fd0ac7f68bebfdd51c80f9f66730a.tar.gz
otp-6a40b71e364fd0ac7f68bebfdd51c80f9f66730a.tar.bz2
otp-6a40b71e364fd0ac7f68bebfdd51c80f9f66730a.zip
[reltool] Automatically add included applications in rel file
If a 'rel' spec in the reltool config does not contain all applications that are listed as {applications,Applications} in a .app file, then these applications are autmatically added when creating the .rel file. For 'included_applications', the behaviour was not the same. I.e. if a 'rel' spec in the reltool config did not contain all applications that are listed as {included_applications,InclApplications} in a .app file, then reltool would fail with reason "Undefined applications" when creating the .rel file. This has been corrected, so both 'applications' and 'included_applications' are now automatically added if not already in the 'rel' spec. I.e. for an application 'z', if z.app contains {applications,[stdlib,kernel,x]} {included_applications,[y]} then reltool configuration {rel, "myrel", "1.0", [z]} will cause the same .rel file as {rel, "myrel", "1.0", [stdlib,kernel,x,y,z]}
Diffstat (limited to 'lib/reltool/src')
-rw-r--r--lib/reltool/src/reltool_target.erl6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/reltool/src/reltool_target.erl b/lib/reltool/src/reltool_target.erl
index 8296cd95be..a47da75c63 100644
--- a/lib/reltool/src/reltool_target.erl
+++ b/lib/reltool/src/reltool_target.erl
@@ -342,9 +342,11 @@ do_merge_apps(RelName, [#rel_app{name = Name} = RA | RelApps], Apps, RelAppType,
false ->
{value, App} = lists:keysearch(Name, #app.name, Apps),
MergedApp = merge_app(RelName, RA, RelAppType, App),
- MoreNames = (MergedApp#app.info)#app_info.applications,
+ ReqNames = (MergedApp#app.info)#app_info.applications,
+ IncNames = (MergedApp#app.info)#app_info.incl_apps,
Acc2 = [MergedApp | Acc],
- do_merge_apps(RelName, MoreNames ++ RelApps, Apps, RelAppType, Acc2)
+ do_merge_apps(RelName, ReqNames ++ IncNames ++ RelApps,
+ Apps, RelAppType, Acc2)
end;
do_merge_apps(RelName, [Name | RelApps], Apps, RelAppType, Acc) ->
case is_already_merged(Name, RelApps, Acc) of