aboutsummaryrefslogtreecommitdiffstats
path: root/src/rlx_release.erl
diff options
context:
space:
mode:
authorLuis Rascão <[email protected]>2016-10-27 18:56:53 +0100
committerGitHub <[email protected]>2016-10-27 18:56:53 +0100
commit42dcb2a4c2ca74eec5c756767d53317ad8e0c227 (patch)
tree13d8b2157efd1e0f9fe9f15ff99d147561492d44 /src/rlx_release.erl
parentf5b11e031383b898b7f517f7f5aa718ddec0b437 (diff)
parent2722180a709ec4303d4f6fce8ed6dd5ea86d7d07 (diff)
downloadrelx-42dcb2a4c2ca74eec5c756767d53317ad8e0c227.tar.gz
relx-42dcb2a4c2ca74eec5c756767d53317ad8e0c227.tar.bz2
relx-42dcb2a4c2ca74eec5c756767d53317ad8e0c227.zip
Merge pull request #530 from lrascao/fix/bring_back_topo_sort
Revert "remove rlx_topo since all systools >=R15 have a working sort of apps"
Diffstat (limited to 'src/rlx_release.erl')
-rw-r--r--src/rlx_release.erl9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/rlx_release.erl b/src/rlx_release.erl
index 0260402..5765079 100644
--- a/src/rlx_release.erl
+++ b/src/rlx_release.erl
@@ -144,7 +144,12 @@ goals(#release_t{goals=Goals}) ->
{ok, t()}.
realize(Rel, Pkgs0, World0) ->
World1 = subset_world(Pkgs0, World0),
- process_specs(realize_erts(Rel), World1).
+ case rlx_topo:sort_apps(World1) of
+ {ok, Pkgs1} ->
+ process_specs(realize_erts(Rel), Pkgs1);
+ Error={error, _} ->
+ Error
+ end.
%% @doc this gives the application specs for the release. This can only be
%% populated by the 'realize' call in this module.
@@ -239,6 +244,8 @@ format_goal(Constraint) ->
rlx_depsolver:format_constraint(Constraint).
-spec format_error(Reason::term()) -> iolist().
+format_error({topo_error, E}) ->
+ rlx_topo:format_error(E);
format_error({failed_to_parse, Con}) ->
io_lib:format("Failed to parse constraint ~p", [Con]);
format_error({invalid_constraint, _, Con}) ->