aboutsummaryrefslogtreecommitdiffstats
path: root/lib/sasl/src/release_handler.erl
diff options
context:
space:
mode:
authorSiri Hansen <[email protected]>2011-11-30 11:28:18 +0100
committerSiri Hansen <[email protected]>2011-11-30 11:28:18 +0100
commit9246167aeea52c7ce956dc5c21c5e4992fe822d5 (patch)
tree56140eebbff000c81fea84d0acba28844c4366fb /lib/sasl/src/release_handler.erl
parent3cce9003a2ebd9aa581ae248c30dd0cc64568397 (diff)
downloadotp-9246167aeea52c7ce956dc5c21c5e4992fe822d5.tar.gz
otp-9246167aeea52c7ce956dc5c21c5e4992fe822d5.tar.bz2
otp-9246167aeea52c7ce956dc5c21c5e4992fe822d5.zip
Keep unpack_release backwards compatible with old systools:make_tar
systools:make_tar has recently been updated to store the .rel file in both releases and releases/<vsn> directories. Ths same commit removed copying of this file from releases to releases/<vsn> in release_handler:unpack_release. This commit adde this copy again to make sure the file is not lost if the tar file was created with an older systools.
Diffstat (limited to 'lib/sasl/src/release_handler.erl')
-rw-r--r--lib/sasl/src/release_handler.erl7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/sasl/src/release_handler.erl b/lib/sasl/src/release_handler.erl
index ce34674e25..522c7b496b 100644
--- a/lib/sasl/src/release_handler.erl
+++ b/lib/sasl/src/release_handler.erl
@@ -842,6 +842,13 @@ do_unpack_release(Root, RelDir, ReleaseName, Releases) ->
extract_tar(Root, Tar),
NewReleases = [Release#release{status = unpacked} | Releases],
write_releases(RelDir, NewReleases, false),
+
+ %% Keeping this for backwards compatibility reasons with older
+ %% systools:make_tar, where there is no copy of the .rel file in
+ %% the releases/<vsn> dir. See OTP-9746.
+ Dir = filename:join([RelDir, Vsn]),
+ copy_file(RelFile, Dir, false),
+
{ok, NewReleases, Vsn}.
%% Note that this function is not executed by a client