aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBadlop <badlop@process-one.net>2021-04-10 17:32:55 +0200
committerBadlop <badlop@process-one.net>2021-04-14 17:12:08 +0200
commitb860a25c82515ba51b044e13ea4e040e3b9bbc41 (patch)
treef183f0248057e6b2927ee26d5a1d77dce621c4fc /src
parentUse Dockerfile (diff)
When using OTP 24.0, use the new 'application' record definition (#3568)
This fixes "ejabberdctl update_list", "update", and the equivalent feature on ejabberd's WebAdmin that got broken when using Erlang/OTP 24
Diffstat (limited to 'src')
-rw-r--r--src/ejabberd_update.erl35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/ejabberd_update.erl b/src/ejabberd_update.erl
index 7785b6084..8cb8c0510 100644
--- a/src/ejabberd_update.erl
+++ b/src/ejabberd_update.erl
@@ -148,6 +148,7 @@ build_script(Dir, UpdatedBeams) ->
{Script, LowLevelScript, Check1}.
%% Copied from Erlang/OTP file: lib/sasl/src/systools.hrl
+-ifdef(SYSTOOLS_APP_DEF_WITHOUT_OPTIONAL).
-record(application,
{name, %% Name of the application, atom().
type = permanent, %% Application start type, atom().
@@ -177,6 +178,40 @@ build_script(Dir, UpdatedBeams) ->
dir = "" %% The directory where the .app file was
%% found (internal use).
}).
+-else.
+-record(application,
+ {name, %% Name of the application, atom().
+ type = permanent, %% Application start type, atom().
+ vsn = "", %% Version of the application, string().
+ id = "", %% Id of the application, string().
+ description = "", %% Description of application, string().
+ modules = [], %% [Module | {Module,Vsn}] of modules
+ %% incorporated in the application,
+ %% Module = atom(), Vsn = string().
+ uses = [], %% [Application] list of applications required
+ %% by the application, Application = atom().
+ optional = [], %% [Application] list of applications in uses
+ %% that are optional, Application = atom().
+ includes = [], %% [Application] list of applications included
+ %% by the application, Application = atom().
+ regs = [], %% [RegNames] a list of registered process
+ %% names used by the application, RegNames =
+ %% atom().
+ env = [], %% [{Key,Value}] environment variable of
+ %% application, Key = Value = term().
+ maxT = infinity, %% Max time an application may exist,
+ %% integer() | infinity.
+ maxP = infinity, %% Max number of processes in an application,
+ %% integer() | infinity.
+ mod = [], %% [] | {Mod, StartArgs}, Mod= atom(),
+ %% StartArgs = list().
+ start_phases, %% [{Phase, PhaseArgs}] | undefined,
+ %% Phase = atom(),
+ %% PhaseArgs = list().
+ dir = "" %% The directory where the .app file was
+ %% found (internal use).
+ }).
+-endif.
make_script(UpdatedBeams) ->