diff options
author | Tristan Sloughter <t@crashfast.com> | 2015-05-14 19:28:26 -0500 |
---|---|---|
committer | Tristan Sloughter <t@crashfast.com> | 2015-05-21 10:27:59 -0500 |
commit | b34cc499244c0900f6362ed9d81c3acbbff8689e (patch) | |
tree | b1213f8857716222786a22c3d90ff01d232ae4e3 /src | |
parent | d91c37ed5cee67a44cc95b4a9e54e6e8582818a9 (diff) |
always upgrade if needs_update is true
Diffstat (limited to 'src')
-rw-r--r-- | src/rebar_prv_install_deps.erl | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/rebar_prv_install_deps.erl b/src/rebar_prv_install_deps.erl index 2d69aa9..7e96090 100644 --- a/src/rebar_prv_install_deps.erl +++ b/src/rebar_prv_install_deps.erl @@ -388,7 +388,7 @@ handle_dep(State, DepsDir, AppInfo, Locks, Level) -> {SrcDeps, PkgDeps} = parse_deps(DepsDir, Deps, S3, Locks, Level), {AppInfo2, SrcDeps, PkgDeps, Locks++NewLocks, State1}. --spec maybe_fetch(rebar_app_info:t(), atom(), boolean() | {true, binary(), integer()}, +-spec maybe_fetch(rebar_app_info:t(), atom(), boolean(), sets:set(binary()), rebar_state:t()) -> {boolean(), rebar_app_info:t()}. maybe_fetch(AppInfo, Profile, Upgrade, Seen, State) -> AppDir = ec_cnv:to_list(rebar_app_info:dir(AppInfo)), @@ -580,10 +580,7 @@ update_app_info(AppInfo) -> IncludedApplications++Applications), rebar_app_info:valid(AppInfo1, false). -maybe_upgrade(AppInfo, AppDir, false, State) -> - Source = rebar_app_info:source(AppInfo), - rebar_fetch:needs_update(AppDir, Source, State); -maybe_upgrade(AppInfo, AppDir, true, State) -> +maybe_upgrade(AppInfo, AppDir, Upgrade, State) -> Source = rebar_app_info:source(AppInfo), case rebar_fetch:needs_update(AppDir, Source, State) of true -> @@ -595,8 +592,13 @@ maybe_upgrade(AppInfo, AppDir, true, State) -> throw(Error) end; false -> - ?INFO("No upgrade needed for ~s", [rebar_app_info:name(AppInfo)]), - false + case Upgrade of + true -> + ?INFO("No upgrade needed for ~s", [rebar_app_info:name(AppInfo)]), + false; + false -> + false + end end. -spec parse_goal(binary(), binary()) -> pkg_dep(). |