summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJean-Sébastien Pédron <jean-sebastien@rabbitmq.com>2015-08-04 11:25:07 +0200
committerJean-Sébastien Pédron <jean-sebastien@rabbitmq.com>2015-08-04 11:25:07 +0200
commitbe83042dd09154a8b40fab5575dc45dd390bea52 (patch)
tree33a9e28bfc7442ee7e3a29e91a1b0b01d7b4c2db /src
parent3f8f24bbb6f75d095f9dd68bb826afb15bc624e5 (diff)
downloadrabbitmq-server-git-be83042dd09154a8b40fab5575dc45dd390bea52.tar.gz
Require Erlang R16B03-1
Fixes #250.
Diffstat (limited to 'src')
-rw-r--r--src/rabbit.erl26
1 files changed, 19 insertions, 7 deletions
diff --git a/src/rabbit.erl b/src/rabbit.erl
index 62369e9d23..d218a07a98 100644
--- a/src/rabbit.erl
+++ b/src/rabbit.erl
@@ -230,8 +230,8 @@
-spec(start/2 :: ('normal',[]) ->
{'error',
{'erlang_version_too_old',
- {'found',[any()]},
- {'required',[any(),...]}}} |
+ {'found',string(),string()},
+ {'required',string(),string()}}} |
{'ok',pid()}).
-spec(stop/1 :: (_) -> 'ok').
@@ -708,11 +708,23 @@ log_broker_started(Plugins) ->
end).
erts_version_check() ->
- FoundVer = erlang:system_info(version),
- case rabbit_misc:version_compare(?ERTS_MINIMUM, FoundVer, lte) of
- true -> ok;
- false -> {error, {erlang_version_too_old,
- {found, FoundVer}, {required, ?ERTS_MINIMUM}}}
+ ERTSVer = erlang:system_info(version),
+ OTPRel = erlang:system_info(otp_release),
+ case rabbit_misc:version_compare(?ERTS_MINIMUM, ERTSVer, lte) of
+ true when ?ERTS_MINIMUM =/= ERTSVer ->
+ ok;
+ true when ?ERTS_MINIMUM =:= ERTSVer andalso ?OTP_MINIMUM =< OTPRel ->
+ %% When a critical regression or bug is found, a new OTP
+ %% release can be published without changing the ERTS
+ %% version. For instance, this is the case with R16B03 and
+ %% R16B03-1.
+ %%
+ %% In this case, we compare the release versions
+ %% alphabetically.
+ ok;
+ _ -> {error, {erlang_version_too_old,
+ {found, OTPRel, ERTSVer},
+ {required, ?OTP_MINIMUM, ?ERTS_MINIMUM}}}
end.
print_banner() ->