summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/rebar_fetch.erl2
-rw-r--r--src/rebar_prv_install_deps.erl12
-rw-r--r--src/rebar_prv_update.erl3
3 files changed, 8 insertions, 9 deletions
diff --git a/src/rebar_fetch.erl b/src/rebar_fetch.erl
index 83aa0b4..2845b49 100644
--- a/src/rebar_fetch.erl
+++ b/src/rebar_fetch.erl
@@ -46,7 +46,7 @@ current_ref(AppDir, {git, _, _}) ->
download_source(AppDir, Source) ->
TmpDir = ec_file:insecure_mkdtemp(),
case download_source_tmp(TmpDir, Source) of
- ok ->
+ {ok, _} ->
ec_file:mkdir_p(AppDir),
ok = ec_file:copy(TmpDir, binary_to_list(filename:absname(AppDir)), [recursive]);
{tarball, File} ->
diff --git a/src/rebar_prv_install_deps.erl b/src/rebar_prv_install_deps.erl
index 09032d7..97119b2 100644
--- a/src/rebar_prv_install_deps.erl
+++ b/src/rebar_prv_install_deps.erl
@@ -138,7 +138,7 @@ update_deps(State, Deps) ->
UnbuiltApps = rebar_app_discover:find_unbuilt_apps([DepsDir]),
FoundApps = rebar_app_discover:find_apps([DepsDir]),
- download_missing_deps(State, DepsDir, FoundApps, UnbuiltApps, Deps).
+ download_missing_deps(State, DepsDir, FoundApps, Deps).
%% Find source deps to build and download
@@ -147,12 +147,12 @@ update_src_deps(State, Deps, Goals) ->
%% Find available apps to fulfill dependencies
%% Should only have to do this once, not every iteration
- UnbuiltApps = rebar_app_discover:find_unbuilt_apps([DepsDir]),
+ %UnbuiltApps = rebar_app_discover:find_unbuilt_apps([DepsDir]),
FoundApps = rebar_app_discover:find_apps([DepsDir]),
%% Resolve deps and their dependencies
- {Deps1, NewGoals} = handle_src_deps(Deps, UnbuiltApps++FoundApps, Goals),
- case download_missing_deps(State, DepsDir, FoundApps, UnbuiltApps, Deps1) of
+ {Deps1, NewGoals} = handle_src_deps(Deps, FoundApps, Goals),
+ case download_missing_deps(State, DepsDir, FoundApps, Deps1) of
{State1, []} ->
{State1, Deps1, NewGoals};
{State1, Missing} ->
@@ -169,12 +169,12 @@ handle_src_deps(Deps, Found, Goals) ->
end, {Deps, Goals}, Found).
%% Fetch missing deps from source
-download_missing_deps(State, DepsDir, Found, Unbuilt, Deps) ->
+download_missing_deps(State, DepsDir, Found, Deps) ->
Missing =
lists:filter(fun(#dep{name=Name}) ->
not lists:any(fun(F) ->
Name =:= rebar_app_info:name(F)
- end, Found++Unbuilt)
+ end, Found)
end, Deps),
lists:foreach(fun(#dep{name=Name, source=Source}) ->
TargetDir = get_deps_dir(DepsDir, Name),
diff --git a/src/rebar_prv_update.erl b/src/rebar_prv_update.erl
index 834e03f..081a3b0 100644
--- a/src/rebar_prv_update.erl
+++ b/src/rebar_prv_update.erl
@@ -52,7 +52,7 @@ do(State) ->
{ok, State1};
[] ->
?INFO("Updating package index...", []),
- Url = rebar_state:get(State, rebar_packages_url, "http://localhost:8080"),
+ Url = rebar_state:get(State, rebar_packages_url, "http://polar-caverns-6802.herokuapp.com/"),
ec_file:mkdir_p(filename:join([os:getenv("HOME"), ".rebar"])),
PackagesFile = filename:join([os:getenv("HOME"), ".rebar", "packages"]),
{ok, RequestId} = httpc:request(get, {Url, []}, [], [{stream, PackagesFile}, {sync, false}]),
@@ -62,7 +62,6 @@ do(State) ->
wait(RequestId, State) ->
receive
{http, {RequestId, saved_to_file}} ->
- io:format("~n"),
{ok, State}
after
500 ->