aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuis Rascao <[email protected]>2017-04-09 22:32:50 +0100
committerLuis Rascao <[email protected]>2017-04-09 22:32:50 +0100
commit61b4bed0610921de9d3c803a5e9e1dad8d47a924 (patch)
tree6f50950e2fffd781dd1776a1d212e70c3c099460
parentc1e37960af7dc23513f7c6dbc8d711dc30050e84 (diff)
downloadrelx-61b4bed0610921de9d3c803a5e9e1dad8d47a924.tar.gz
relx-61b4bed0610921de9d3c803a5e9e1dad8d47a924.tar.bz2
relx-61b4bed0610921de9d3c803a5e9e1dad8d47a924.zip
Only ensure kernel,stdlib for empty dep apps
Do not try and ensure them for every app, there are some OTP apps that only require kernel and there's really no point in rewriting those.
-rw-r--r--src/rlx_app_discovery.erl7
-rw-r--r--test/rlx_release_SUITE.erl2
2 files changed, 5 insertions, 4 deletions
diff --git a/src/rlx_app_discovery.erl b/src/rlx_app_discovery.erl
index aab1d3b..0414a0a 100644
--- a/src/rlx_app_discovery.erl
+++ b/src/rlx_app_discovery.erl
@@ -303,9 +303,10 @@ get_deps(AppDir, AppName, AppVsn, AppDetail) ->
Apps :: list(atom())) -> list(atom()).
ensure_stdlib_kernel(kernel, Deps) -> Deps;
ensure_stdlib_kernel(stdlib, Deps) -> Deps;
-ensure_stdlib_kernel(_AppName, Deps) ->
- %% ensure that stdlib and kernel are the first deps
- [kernel, stdlib | Deps -- [stdlib, kernel]].
+ensure_stdlib_kernel(_AppName, []) ->
+ %% minimum required deps are kernel and stdlib
+ [kernel, stdlib];
+ensure_stdlib_kernel(_AppName, Deps) -> Deps.
%%%===================================================================
%%% Test Functions
diff --git a/test/rlx_release_SUITE.erl b/test/rlx_release_SUITE.erl
index 3323bed..c9430fd 100644
--- a/test/rlx_release_SUITE.erl
+++ b/test/rlx_release_SUITE.erl
@@ -1436,7 +1436,7 @@ make_exclude_modules_release(Config) ->
{modules,[]},
{included_applications,[]},
{registered,[]},
- {applications,[kernel,stdlib]}]}]},
+ {applications,[stdlib,kernel]}]}]},
file:consult(filename:join([OutputDir, "foo", "lib",
"non_goal_1-0.0.1", "ebin",
"non_goal_1.app"]))).