From 6a40b71e364fd0ac7f68bebfdd51c80f9f66730a Mon Sep 17 00:00:00 2001 From: Siri Hansen Date: Fri, 14 Sep 2012 16:07:18 +0200 Subject: [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]} --- lib/reltool/src/reltool_target.erl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lib/reltool/src/reltool_target.erl') 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 -- cgit v1.2.3