[erlang-patches] The 'start_phases' entry in .app files is incorrectly set to 'undefined' when generating a release

Juan Jose Comellas juanjo@REDACTED
Tue Jan 3 05:21:24 CET 2012


The default value for 'start_phases' in .app files should be [], but
it is incorrectly set to 'undefined' when generating a release. This
happens when the original .app file does not set a value for
'start_phases' explicitly.

The reltool application defines its own copy of a record to handle
.app files (#app_info{}, defined in lib/reltool/src/reltool.hrl) that
has different default values than the one used by systools
(#application{}, defined in lib/sasl/src/systools.hrl). In particular,
the 'start_phases' entry is assumed by all of OTP to be [] when it is
not explicitly set but reltool sets it to 'undefined' by default. This
causes badmatch errors when trying to generate release upgrades.

Without this patch, all of the rebar examples that generate release
upgrades that I've found on the web will fail. The bug was introduced
in R14A.

git fetch git://github.com/jcomellas/otp.git jc-fix-default-start-phases

Juanjo



More information about the erlang-patches mailing list