summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTristan Sloughter <t@crashfast.com>2014-08-23 15:55:51 -0500
committerTristan Sloughter <t@crashfast.com>2014-08-23 15:55:51 -0500
commitae55c39c966abd7fb2cb87b60d5e00867d81e8bc (patch)
tree0e50f0da76496e96fc99150f8e2f0c4c7bea8094
parent99136c38b588beaa975f9b1d1895db4ee91f836e (diff)
fix state of rebar for building deps
-rw-r--r--src/rebar_prv_deps.erl10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/rebar_prv_deps.erl b/src/rebar_prv_deps.erl
index 7f487cf..3806faf 100644
--- a/src/rebar_prv_deps.erl
+++ b/src/rebar_prv_deps.erl
@@ -62,7 +62,9 @@ init(State) ->
do(State) ->
%% Read in package index and dep graph
{Packages, Graph} = get_packages(State),
+ PtDeps = rebar_state:get(State, pt_deps, []),
SrcDeps = rebar_state:get(State, src_deps, []),
+ {State1, _PtDeps1} = update_deps(State, PtDeps),
{State1, SrcDeps1} = update_deps(State, SrcDeps),
case rebar_state:get(State1, deps, []) of
@@ -144,7 +146,7 @@ download_missing_deps(State, DepsDir, Found, Unbuilt, Deps) ->
to_binary(dep_name(X)) =:= to_binary(rebar_app_info:name(F))
end, Found++Unbuilt)
end, Deps),
- ec_plists:map(fun({DepName, _DepVsn, DepSource}) ->
+ lists:map(fun({DepName, _DepVsn, DepSource}) ->
TargetDir = get_deps_dir(DepsDir, DepName),
case filelib:is_dir(TargetDir) of
true ->
@@ -155,7 +157,11 @@ download_missing_deps(State, DepsDir, Found, Unbuilt, Deps) ->
rebar_fetch:download_source(TargetDir, DepSource),
case rebar_app_discover:find_unbuilt_apps([TargetDir]) of
[AppSrc] ->
- _AppInfo1 = rebar_prv_app_builder:build(State, AppSrc);
+ C = rebar_config:consult(rebar_app_info:dir(AppSrc)),
+ S = rebar_state:new(rebar_state:new()
+ ,C
+ ,rebar_app_info:dir(AppSrc)),
+ _AppInfo1 = rebar_prv_app_builder:build(S, AppSrc);
[] ->
[]
end