summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjoewilliams <joe@joetify.com>2011-10-14 16:37:26 -0700
committerjoewilliams <joe@joetify.com>2011-10-15 10:24:40 -0700
commitf82028a544e62a2e712e9118fbc9225bcd74e351 (patch)
tree4f757fafeeff011ba86a33e29c0671da6bed5d19 /src
parent577574675815ec93e720af5eda1dccddd463603a (diff)
More descriptive logging for upgrade systools cmds
In debugging upgrade issues it is sometimes difficult to know which systools step a error ocurred at, a little extra logging to fix that.
Diffstat (limited to 'src')
-rw-r--r--src/rebar_upgrade.erl23
1 files changed, 14 insertions, 9 deletions
diff --git a/src/rebar_upgrade.erl b/src/rebar_upgrade.erl
index 0b39035..b913ef2 100644
--- a/src/rebar_upgrade.erl
+++ b/src/rebar_upgrade.erl
@@ -124,19 +124,23 @@ run_systools(NewVer, Name) ->
Opts = [silent],
NameList = [Name],
case systools:make_relup(NewVer, NameList, NameList, Opts) of
- {error, _, _Message} ->
- ?ABORT("Systools aborted with: ~p~n", [_Message]);
+ {error, _, Msg} ->
+ ?ABORT("Systools [systools:make_relup/4] aborted with: ~p~n",
+ [Msg]);
_ ->
?DEBUG("Relup created~n", []),
case systools:make_script(NewVer, Opts) of
- {error, _, _Message1} ->
- ?ABORT("Systools aborted with: ~p~n", [_Message1]);
+ {error, _, Msg1} ->
+ ?ABORT("Systools [systools:make_script/2] "
+ "aborted with: ~p~n", [Msg1]);
_ ->
?DEBUG("Script created~n", []),
case systools:make_tar(NewVer, Opts) of
- {error, _, _Message2} ->
- ?ABORT("Systools aborted with: ~p~n", [_Message2]);
+ {error, _, Msg2} ->
+ ?ABORT("Systools [systools:make_tar/2] "
+ "aborted with: ~p~n", [Msg2]);
_ ->
+ ?DEBUG("Tarball created~n", []),
ok
end
end
@@ -149,9 +153,10 @@ boot_files(TargetDir, Ver, Name) ->
ok = file:make_symlink(
filename:join(["start.boot"]),
filename:join([".", ?TMP, "releases", Ver, Name ++ ".boot"])),
- {ok, _} = file:copy(
- filename:join([TargetDir, "releases", Ver, "start_clean.boot"]),
- filename:join([".", ?TMP, "releases", Ver, "start_clean.boot"])),
+ {ok, _} =
+ file:copy(
+ filename:join([TargetDir, "releases", Ver, "start_clean.boot"]),
+ filename:join([".", ?TMP, "releases", Ver, "start_clean.boot"])),
{ok, _} = file:copy(
filename:join([TargetDir, "releases", Ver, "vm.args"]),
filename:join([".", ?TMP, "releases", Ver, "vm.args"])).