When upgrading rebar3 of an umbrella project from 3.12 to 3.19, I encounter a problem:
Packaging with rebar3 as prod tar, it is found that the overlay configured in the app does not replace the general overlay.
but rebar3 as prod release is ok.
Try to modify the code of relx.erl:
https://github.com/erlware/relx/blob/main/src/relx.erl
build_release_(#{name := RelName,
vsn := RelVsn}, Apps, State) ->
Release = rlx_state:get_configured_release(State, RelName, RelVsn),
{ok, RealizedRelease, State1} =
rlx_resolve:solve_release(Release, rlx_state:available_apps(State, Apps)),
{ok, State2} = rlx_assemble:do(RealizedRelease, State1),
_ = rlx_overlay:render(RealizedRelease, State2),
RealizedRelease.
build_tar(Release=#{name := RelName,
vsn := RelVsn}, Apps, State) when is_atom(RelName) ,
is_list(RelVsn) ->
RealizedRelease = build_release_(Release, Apps, State),
build_tar_(RealizedRelease, State),
{ok, RealizedRelease};
Change it to the following:
build_release_(#{name := RelName,
vsn := RelVsn}, Apps, State) ->
Release = rlx_state:get_configured_release(State, RelName, RelVsn),
{ok, RealizedRelease, State1} =
rlx_resolve:solve_release(Release, rlx_state:available_apps(State, Apps)),
{ok, State2} = rlx_assemble:do(RealizedRelease, State1),
_ = rlx_overlay:render(RealizedRelease, State2),
%RealizedRelease.
{ok, State2, RealizedRelease}.
build_tar(Release=#{name := RelName,
vsn := RelVsn}, Apps, State) when is_atom(RelName) ,
is_list(RelVsn) ->
%RealizedRelease = build_release_(Release, Apps, State),
%build_tar_(RealizedRelease, State),
{ok, State1, RealizedRelease} = build_release_(Release, Apps, State),
build_tar_(RealizedRelease, State1),
{ok, RealizedRelease};
After recompiling rebar3, the problem is solved.
When upgrading rebar3 of an umbrella project from 3.12 to 3.19, I encounter a problem:
Packaging with
rebar3 as prod tar, it is found that the overlay configured in the app does not replace the general overlay.but
rebar3 as prod releaseis ok.Try to modify the code of relx.erl:
https://github.com/erlware/relx/blob/main/src/relx.erl
Change it to the following:
After recompiling rebar3, the problem is solved.