Closed
Description
Using the following script--called v1to2.sh
--in the root of the beat project:
#!/bin/sh
## Run from the root of http://github.com/blt/beat
set -e
rm -rf /tmp/beat
rm -rf _rel
git checkout v1
make release
tar cvzf beat-0.1.0.tar.gz -C _rel .
git checkout v2
make relup
tar cvzf beat-0.1.1.tar.gz -C _rel .
mkdir -p /tmp/beat
cp beat-0.1.0.tar.gz /tmp
cp beat-0.1.1.tar.gz /tmp
cd /tmp/beat
tar xf /tmp/beat-0.1.0.tar.gz
./bin/beat-0.1.0 start
cp /tmp/beat-0.1.1.tar.gz releases/
I'm able to get a running release of beat-0.1.0
easily enough.
> ./bin/beat-0.1.0 start
> ./bin/beat-0.1.0 attach
(beat@127.0.0.1)1> application:which_applications().
[{sasl,"SASL CXC 138 11","2.2.1"},
{beat_tcp_api,"The TCP API of the 'beat' project","2013.1"},
{beat_core,"The core application of the 'beat' project'",
"2013.1"},
{stdlib,"ERTS CXC 138 10","1.18.3"},
{kernel,"ERTS CXC 138 10","2.15.3"}]
When I attempt to unpack the release I find:
(beat@127.0.0.1)2> release_handler:unpack_release("beat-0.1.1").
{error,{{badmatch,{error,enoent}},
[{erl_tar,default_options,0,
[{file,"erl_tar.erl"},{line,440}]},
{erl_tar,extract_opts,1,[{file,"erl_tar.erl"},{line,434}]},
{erl_tar,extract,2,[{file,"erl_tar.erl"},{line,136}]},
{release_handler,do_unpack_release,4,
[{file,"release_handler.erl"},{line,834}]},
{release_handler,handle_call,3,
[{file,"release_handler.erl"},{line,588}]},
{gen_server,handle_msg,5,
[{file,"gen_server.erl"},{line,588}]},
{proc_lib,init_p_do_apply,3,
[{file,"proc_lib.erl"},{line,227}]}]}}
On #erlang @tsloughter was kind enough to look into my original report and indicated he had some success:
17:21 tristan__: troutwine: yea, so I got it to unpack properly
17:22 tristan__: but I had to place the beat.rel file with it under /tmp/beat/releases/2013.2
17:22 tristan__: then
17:22 vinoski: paatus: sure. the [ ... || ... ] construct is called a list comprehension. the D on the right gets each member of the list created by integer_to_list, and in turn each D is processed on the left
17:22 tristan__: release_handler:unpack_release("2013.2/beat").
17:22 tristan__: worked
I was not able to reproduce before @tsloughter had to leave the channel. (It may also be that @tsloughter was working from an old beat checkout. As of 6fcf9724cc8c9c247f1515d9b44b475b46a82e38 beat now uses semvar for release-level version numbers.)
Metadata
Metadata
Assignees
Labels
No labels