devel/relx: fix usage of {include_erts,true} (GitHub pull request #565).
This commit is contained in:
parent
a4d4b29648
commit
f3e56928d6
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=433885
2 changed files with 38 additions and 0 deletions
|
@ -2,6 +2,7 @@
|
|||
|
||||
PORTNAME= relx
|
||||
PORTVERSION= 3.22.2
|
||||
PORTREVISION= 1
|
||||
DISTVERSIONPREFIX= v
|
||||
CATEGORIES= devel
|
||||
MASTER_SITES+= LOCAL/olgeni:deps \
|
||||
|
|
37
devel/relx/files/patch-src_rlx__prv__assembler.erl
Normal file
37
devel/relx/files/patch-src_rlx__prv__assembler.erl
Normal file
|
@ -0,0 +1,37 @@
|
|||
--- src/rlx_prv_assembler.erl.orig 2016-12-27 16:21:42 UTC
|
||||
+++ src/rlx_prv_assembler.erl
|
||||
@@ -121,7 +121,10 @@ format_error({start_clean_script_generat
|
||||
rlx_util:indent(2), Module:format_error(Errors)];
|
||||
format_error({strip_release, Reason}) ->
|
||||
io_lib:format("Stripping debug info from release beam files failed becuase ~s",
|
||||
- [beam_lib:format_error(Reason)]).
|
||||
+ [beam_lib:format_error(Reason)]);
|
||||
+format_error({rewrite_app_file, AppFile, Error}) ->
|
||||
+ io_lib:format("Unable to rewrite .app file ~s due to ~p",
|
||||
+ [AppFile, Error]).
|
||||
|
||||
%%%===================================================================
|
||||
%%% Internal Functions
|
||||
@@ -255,13 +258,16 @@ rewrite_app_file(State, App, TargetDir)
|
||||
,AppData2
|
||||
,{modules, OldModules -- ExcludedModules})
|
||||
end,
|
||||
- Spec = io_lib:format("~p.\n", [{application, AppName, AppData3}]),
|
||||
- write_file_if_contents_differ(AppFile, Spec).
|
||||
+ Spec = [{application, AppName, AppData3}],
|
||||
+ case write_file_if_contents_differ(AppFile, Spec) of
|
||||
+ ok -> ok;
|
||||
+ Error -> ?RLX_ERROR({rewrite_app_file, AppFile, Error})
|
||||
+ end.
|
||||
|
||||
-write_file_if_contents_differ(Filename, Bytes) ->
|
||||
- ToWrite = iolist_to_binary(Bytes),
|
||||
- case file:read_file(Filename) of
|
||||
- {ok, ToWrite} ->
|
||||
+write_file_if_contents_differ(Filename, Spec) ->
|
||||
+ ToWrite = io_lib:format("~p.\n", Spec),
|
||||
+ case file:consult(Filename) of
|
||||
+ {ok, Spec} ->
|
||||
ok;
|
||||
{ok, _} ->
|
||||
file:write_file(Filename, ToWrite);
|
Loading…
Reference in a new issue