basho/riak_api — pull request #6 by russelldb (2012-07-16 16:55:42+00:00)
Title: Add riak_core as application dep to riak_api.app

When generating a release with erlang r14b0* riak fails to start with:

{"Kernel pid terminated",application_controller,
"{application_start_failure,riak_api,{bad_return, {{riak_api_app,start,[normal,[]]},
{'EXIT',{noproc,{gen_server,call,
[riak_core_stat_cache,{register,riak_api,{riak_api_stat,produce_stats,[]},5}]}}}}}}"}

This is due to the start order in the generated `riak.script`.
According to systools' man page -

> "The applications are sorted according to the dependencies between
> the applications. Where there are no dependencies, the order in the
> .rel file is kept."

There may be a better way to control the
order in the `rel` file, but this PR fixes the issue by
declaring riak_api's dependency on riak_core.