From 9246167aeea52c7ce956dc5c21c5e4992fe822d5 Mon Sep 17 00:00:00 2001 From: Siri Hansen Date: Wed, 30 Nov 2011 11:28:18 +0100 Subject: 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/ directories. Ths same commit removed copying of this file from releases to releases/ 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. --- lib/sasl/src/release_handler.erl | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lib') 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/ 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 -- cgit v1.2.3