aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJordan Wilberding <[email protected]>2013-04-13 21:31:30 -0700
committerJordan Wilberding <[email protected]>2013-04-13 21:31:30 -0700
commit699bb108c86785774db005bd0678a7dfa1c3ddd9 (patch)
treee4511928130994efa78e65f47e6f0bd0b71685ce /src
parentbfc2e2f85c941460c4b59636a7bb2ade806f0fdf (diff)
parent492c954ede0380879fa66dfcc4550fc80584eeed (diff)
downloadrelx-699bb108c86785774db005bd0678a7dfa1c3ddd9.tar.gz
relx-699bb108c86785774db005bd0678a7dfa1c3ddd9.tar.bz2
relx-699bb108c86785774db005bd0678a7dfa1c3ddd9.zip
Merge pull request #54 from tsloughter/master
skip apps support
Diffstat (limited to 'src')
-rw-r--r--src/rcl_app_discovery.erl4
-rw-r--r--src/rcl_prv_config.erl2
-rw-r--r--src/rcl_state.erl13
3 files changed, 18 insertions, 1 deletions
diff --git a/src/rcl_app_discovery.erl b/src/rcl_app_discovery.erl
index 1f1ecc8..7b04b19 100644
--- a/src/rcl_app_discovery.erl
+++ b/src/rcl_app_discovery.erl
@@ -66,7 +66,9 @@ resolve_app_metadata(State, LibDirs) ->
false
end] of
[] ->
- AppMeta1 = [App || {ok, App} <- setup_overrides(State, AppMeta0)],
+ SkipApps = rcl_state:skip_apps(State),
+ AppMeta1 = [App || {ok, App} <- setup_overrides(State, AppMeta0),
+ not lists:keymember(rcl_app_info:name(App), 1, SkipApps)],
rcl_log:debug(rcl_state:log(State),
fun() ->
["Resolved the following OTP Applications from the system: \n",
diff --git a/src/rcl_prv_config.erl b/src/rcl_prv_config.erl
index 4d1c119..dfbc321 100644
--- a/src/rcl_prv_config.erl
+++ b/src/rcl_prv_config.erl
@@ -144,6 +144,8 @@ load_terms({add_providers, Providers0}, {ok, State0}) ->
ExistingProviders = rcl_state:providers(State1),
{ok, rcl_state:providers(State1, ExistingProviders ++ Providers3)}
end;
+load_terms({skip_apps, SkipApps0}, {ok, State0}) ->
+ {ok, rcl_state:skip_apps(State0, SkipApps0)};
load_terms({overrides, Overrides0}, {ok, State0}) ->
{ok, rcl_state:overrides(State0, Overrides0)};
load_terms({release, {RelName, Vsn}, Applications}, {ok, State0}) ->
diff --git a/src/rcl_state.erl b/src/rcl_state.erl
index 7247818..4b21bbe 100644
--- a/src/rcl_state.erl
+++ b/src/rcl_state.erl
@@ -29,6 +29,8 @@
lib_dirs/1,
overrides/1,
overrides/2,
+ skip_apps/1,
+ skip_apps/2,
goals/1,
config_file/1,
config_file/2,
@@ -74,6 +76,7 @@
default_release :: {rcl_release:name(), rcl_release:vsn()},
sys_config :: file:filename() | undefined,
overrides :: [{AppName::atom(), Directory::file:filename()}],
+ skip_apps = [] :: [AppName::atom()],
releases :: releases(),
discovered_releases :: releases(),
config_values :: ec_dictionary:dictionary(Key::atom(),
@@ -129,6 +132,16 @@ overrides(#state_t{overrides=Overrides}) ->
overrides(State, Overrides) ->
State#state_t{overrides=Overrides}.
+
+-spec skip_apps(t()) -> [AppName::atom()].
+skip_apps(#state_t{skip_apps=Apps}) ->
+ Apps.
+
+%% @doc the application overrides for the system
+-spec skip_apps(t(), [AppName::atom()]) -> t().
+skip_apps(State, SkipApps) ->
+ State#state_t{skip_apps=SkipApps}.
+
%% @doc get the current log state for the system
-spec log(t()) -> rcl_log:t().
log(#state_t{log=LogState}) ->