I was wondering what is the reason for the following reltool behavior:
If my reltool.config
uses the default parameters mod_cond
and incl_cond
, and if one of my included applications has a module that is also part of some application installed on my machine, but NOT included in my release reltool: get_target_spec / 1 returns :
{error, "Module <some_module> potentially included by two different applications: <system_app> and <my_app>."}
Which is annoying as <system_app>
NOT part of my release (directly or indirectly). Could reltool actually figure out that <system_app>
will not be included in my release? That is why it is "potentially included"
?
In any case, in order to generate my release, I must either explicitly exclude <system_app>
via {app, <system_app> [{incl_cond, exclude}]}
, which is ugly, since this <system_app>
simply installed in the root_dir
of the Erlang / system The OTP machine I'm building on (it cannot be installed on other build machines) and has nothing to do with my version. Actual example: tsung-1.4.3 includes the mochijson2
module, so I had a problem creating my own version, which should include the mochiweb
application mochiweb
machine where tsung is installed (but not on other machines). Another option would be to change the upper level of incl_cond
from {incl_cond, derived}
to {incl_cond, exclude}
, and then manually turn on the entire application that I want to be part of my version, which is better (will work on any build machine), but still not really as it needs to be done manually (I want to rely on relltool to figure out the dependencies).
So why does this situation arise? Why reltool
just the presence of any application on the build machine lead to the error above reltool
?
PS As a note, I think that line 907-909 of the current version of reltool_server.erl contains an error: it will generate a bad argument
if it is ever called.
source share