summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFred Hebert <mononcqc@ferd.ca>2016-05-24 20:43:38 -0400
committerFred Hebert <mononcqc@ferd.ca>2016-05-24 20:43:38 -0400
commit9a7ede0196c78224c15d1e9c8d13bed84743dacf (patch)
tree98ffea691123280b66ec6f81243581b5ac22fdf1 /src
parentbe79259e324e66ac2f948aed186474cb06a2ea85 (diff)
Fetch hashes from index prior to fetching
Diffstat (limited to 'src')
-rw-r--r--src/rebar_app_utils.erl9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/rebar_app_utils.erl b/src/rebar_app_utils.erl
index 7028c32..f3b2962 100644
--- a/src/rebar_app_utils.erl
+++ b/src/rebar_app_utils.erl
@@ -182,7 +182,14 @@ update_source(AppInfo, {pkg, PkgName, PkgVsn, Hash}, State) ->
_ ->
{PkgName, PkgVsn}
end,
- AppInfo1 = rebar_app_info:source(AppInfo, {pkg, PkgName1, PkgVsn1, Hash}),
+ %% store the expected hash for the dependency
+ Hash1 = case Hash of
+ undefined -> % unknown, define the hash since we know the dep
+ rebar_packages:registry_checksum({pkg, PkgName1, PkgVsn1, Hash}, State);
+ _ -> % keep as is
+ Hash
+ end,
+ AppInfo1 = rebar_app_info:source(AppInfo, {pkg, PkgName1, PkgVsn1, Hash1}),
Deps = rebar_packages:deps(PkgName1
,PkgVsn1
,State),