aboutsummaryrefslogtreecommitdiffstats
path: root/src/rcl_state.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/rcl_state.erl')
-rw-r--r--src/rcl_state.erl14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/rcl_state.erl b/src/rcl_state.erl
index 46c91c7..7397e6f 100644
--- a/src/rcl_state.erl
+++ b/src/rcl_state.erl
@@ -27,6 +27,8 @@
log/1,
output_dir/1,
lib_dirs/1,
+ overrides/1,
+ overrides/2,
goals/1,
config_files/1,
providers/1,
@@ -64,6 +66,7 @@
available_apps = [] :: [rcl_app_info:t()],
default_release :: {rcl_release:name(), rcl_release:vsn()},
sys_config :: file:filename() | undefined,
+ overrides :: [{AppName::atom(), Directory::file:filename()}],
releases :: ec_dictionary:dictionary({ReleaseName::atom(),
ReleaseVsn::string()},
rcl_release:t()),
@@ -96,10 +99,21 @@ new(PropList, Targets) when erlang:is_list(PropList) ->
providers = [],
releases=ec_dictionary:new(ec_dict),
config_values=ec_dictionary:new(ec_dict),
+ overrides = proplists:get_value(overrides, PropList, []),
default_release={proplists:get_value(relname, PropList, undefined),
proplists:get_value(relvsn, PropList, undefined)}},
create_logic_providers(State0).
+%% @doc the application overrides for the system
+-spec overrides(t()) -> [{AppName::atom(), Directory::file:filename()}].
+overrides(#state_t{overrides=Overrides}) ->
+ Overrides.
+
+%% @doc the application overrides for the system
+-spec overrides(t(), [{AppName::atom(), Directory::file:filename()}]) -> t().
+overrides(State, Overrides) ->
+ State#state_t{overrides=Overrides}.
+
%% @doc get the current log state for the system
-spec log(t()) -> rcl_log:t().
log(#state_t{log=LogState}) ->