diff options
author | Tristan Sloughter <[email protected]> | 2013-09-20 19:49:28 -0500 |
---|---|---|
committer | Tristan Sloughter <[email protected]> | 2013-09-20 21:55:29 -0500 |
commit | 21056c6af7e0be26f49ed3c72fe297c56a2737bc (patch) | |
tree | da263680b3ecb28ff8723e4ac0ca4a0e5b99b92f | |
parent | 2ef124bf890d98a4b71cafd89c280c8c084bc300 (diff) | |
download | relx-21056c6af7e0be26f49ed3c72fe297c56a2737bc.tar.gz relx-21056c6af7e0be26f49ed3c72fe297c56a2737bc.tar.bz2 relx-21056c6af7e0be26f49ed3c72fe297c56a2737bc.zip |
replace confusing disable-default-libs option with default-libs true or false
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | src/relx.erl | 6 | ||||
-rw-r--r-- | src/rlx_cmd_args.erl | 4 | ||||
-rw-r--r-- | src/rlx_prv_discover.erl | 6 | ||||
-rw-r--r-- | src/rlx_state.erl | 4 | ||||
-rw-r--r-- | test/rlx_discover_SUITE.erl | 2 |
6 files changed, 12 insertions, 12 deletions
@@ -56,7 +56,7 @@ Options | -o | --output-dir | string | ./ | The output directory for the release | | -l | --lib-dir | string | | Additional dirs to search for OTP apps | | -p | --path | string | | Additional dirs to add to Erlang code path | -| | --disable-default-libs | boolean | false | Disable use of the default system added lib dirs | +| | --default-libs | boolean | true | Whether to use the default system added lib dirs (means you must add them all manually) | | -V | --verbose | integer | 0 | The verbosity level between 0 and 2 | | -a | --override_app | string | | An app name and a directory to override in the form appname:dir | | -c | --config | string | ./relx.config | Config file path | diff --git a/src/relx.erl b/src/relx.erl index 2aac8e4..f6575a1 100644 --- a/src/relx.erl +++ b/src/relx.erl @@ -192,9 +192,9 @@ opt_spec_list() -> "Additional dir that should be searched for OTP Apps"}, {path, $p, "path", string, "Additional dir to add to the code path"}, - {disable_default_libs, undefined, "disable-default-libs", - {boolean, false}, - "Disable the default system added lib dirs (means you must add them all manually"}, + {default_libs, undefined, "default-libs", + {boolean, true}, + "Whether to use the default system added lib dirs (means you must add them all manually). Default is true"}, {log_level, $V, "verbose", {integer, 1}, "Verbosity level, maybe between 0 and 2"}, {override_app, $a, "override_app", string, diff --git a/src/rlx_cmd_args.erl b/src/rlx_cmd_args.erl index 619163a..621b626 100644 --- a/src/rlx_cmd_args.erl +++ b/src/rlx_cmd_args.erl @@ -245,8 +245,8 @@ create_root_dir(Opts, Acc) -> -spec create_disable_default_libs([getopt:option()], rlx_state:cmd_args()) -> {ok, rlx_state:cmd_args()} | relx:error(). create_disable_default_libs(Opts, Acc) -> - Def = proplists:get_value(disable_default_libs, Opts, false), - create_upfrom(Opts, [{disable_default_libs, Def} | Acc]). + Def = proplists:get_value(default_libs, Opts, true), + create_upfrom(Opts, [{default_libs, Def} | Acc]). -spec create_upfrom([getopt:option()], rlx_state:cmd_args()) -> {ok, rlx_state:cmd_args()} | relx:error(). diff --git a/src/rlx_prv_discover.erl b/src/rlx_prv_discover.erl index 5e54828..4f297fe 100644 --- a/src/rlx_prv_discover.erl +++ b/src/rlx_prv_discover.erl @@ -75,10 +75,10 @@ add(Rel, Dict) -> get_lib_dirs(State) -> LibDirs0 = rlx_state:lib_dirs(State), - case rlx_state:get(State, disable_default_libs, false) of - true -> - LibDirs0; + case rlx_state:get(State, default_libs, true) of false -> + LibDirs0; + true -> lists:flatten([LibDirs0, add_common_project_dirs(State), add_system_lib_dir(State), diff --git a/src/rlx_state.erl b/src/rlx_state.erl index b35baf3..4c6df07 100644 --- a/src/rlx_state.erl +++ b/src/rlx_state.erl @@ -135,8 +135,8 @@ new(PropList, Targets) default_configured_release={proplists:get_value(relname, PropList, undefined), proplists:get_value(relvsn, PropList, undefined)}}, rlx_state:put(create_logic_providers(State0), - disable_default_libs, - proplists:get_value(disable_default_libs, PropList, false)). + default_libs, + proplists:get_value(default_libs, PropList, true)). %% @doc the actions targeted for this system -spec actions(t()) -> [action()]. diff --git a/test/rlx_discover_SUITE.erl b/test/rlx_discover_SUITE.erl index c4455e1..93a576b 100644 --- a/test/rlx_discover_SUITE.erl +++ b/test/rlx_discover_SUITE.erl @@ -73,7 +73,7 @@ normal_case(Config) -> [{create_random_name("lib_app2_"), create_random_vsn()} || _ <- lists:seq(1, 100)]], State0 = rlx_state:put(proplists:get_value(state, Config), - disable_default_libs, true), + default_libs, false), {DiscoverProvider, {ok, State1}} = rlx_provider:new(rlx_prv_discover, State0), {ok, State2} = rlx_provider:do(DiscoverProvider, State1), lists:foreach(fun(App) -> |