aboutsummaryrefslogtreecommitdiff
path: root/lang/erlang
diff options
context:
space:
mode:
authorJimmy Olgeni <olgeni@FreeBSD.org>2004-12-30 22:34:09 +0000
committerJimmy Olgeni <olgeni@FreeBSD.org>2004-12-30 22:34:09 +0000
commit91fa3383731863bbc44e0d6a60fa1b4982c0ce0f (patch)
treeab4c717156088f49dad439e39b32e82d7e5b4f44 /lang/erlang
parent75e70fa679c28434a5b368c81f45f181ab2f356a (diff)
downloadports-91fa3383731863bbc44e0d6a60fa1b4982c0ce0f.tar.gz
ports-91fa3383731863bbc44e0d6a60fa1b4982c0ce0f.zip
Fix issue with rb:show/1 (could not be called twice).
Obtained from: Peter Andersson <peppe (at) erix.ericsson.se>
Notes
Notes: svn path=/head/; revision=125569
Diffstat (limited to 'lang/erlang')
-rw-r--r--lang/erlang/Makefile1
-rw-r--r--lang/erlang/files/patch-lib_sasl_src_rb.erl65
2 files changed, 66 insertions, 0 deletions
diff --git a/lang/erlang/Makefile b/lang/erlang/Makefile
index 156b2f445710..2098042ee87b 100644
--- a/lang/erlang/Makefile
+++ b/lang/erlang/Makefile
@@ -7,6 +7,7 @@
PORTNAME= erlang
PORTVERSION= r10b2
+PORTREVISION= 1
PORTEPOCH= 1
CATEGORIES= lang parallel
MASTER_SITES= http://www.erlang.org/download/ \
diff --git a/lang/erlang/files/patch-lib_sasl_src_rb.erl b/lang/erlang/files/patch-lib_sasl_src_rb.erl
new file mode 100644
index 000000000000..6fae0f417ac4
--- /dev/null
+++ b/lang/erlang/files/patch-lib_sasl_src_rb.erl
@@ -0,0 +1,65 @@
+
+$FreeBSD$
+
+--- lib/sasl/src/rb.erl.orig
++++ lib/sasl/src/rb.erl
+@@ -177,7 +177,7 @@
+ {reply, ok, State#state{device = standard_io}};
+ handle_call({show_number, Number}, _From, State) ->
+ #state{dir = Dir, data = Data, device = Device, abort = Abort, log = Log} = State,
+- NewDevice = print_report(Dir, Data, Number, Device, Abort, Log),
++ NewDevice = print_report_by_num(Dir, Data, Number, Device, Abort, Log),
+ {reply, ok, State#state{device = NewDevice}};
+ handle_call({show_type, Type}, _From, State) ->
+ #state{dir = Dir, data = Data, device = Device, abort = Abort, log = Log} = State,
+@@ -541,6 +541,10 @@
+ io_lib:format("~s", [ShortDescr]),
+ Date]).
+
++print_report_by_num(Dir, Data, Number, Device, Abort, Log) ->
++ {_,Device1} = print_report(Dir, Data, Number, Device, Abort, Log),
++ Device1.
++
+ print_typed_reports(_Dir, [], _Type, Device, _Abort, _Log) ->
+ Device;
+ print_typed_reports(Dir, Data, Type, Device, Abort, Log) ->
+@@ -569,23 +573,29 @@
+ end.
+
+ print_report(Dir, Data, Number, Device, Abort, Log) ->
+- {Fname, FilePosition} = find_report(Data, Number),
+- FileName = lists:concat([Dir, Fname]),
+- case file:open(FileName, read) of
+- {ok, Fd} ->
+- read_rep(Fd, FilePosition, Device, Abort, Log);
+- _ ->
+- io:format("rb: can't open file ~p~n", [Fname]),
++ case find_report(Data, Number) of
++ {Fname, FilePosition} ->
++ FileName = lists:concat([Dir, Fname]),
++ case file:open(FileName, read) of
++ {ok, Fd} ->
++ read_rep(Fd, FilePosition, Device, Abort, Log);
++ _ ->
++ io:format("rb: can't open file ~p~n", [Fname]),
++ {proceed,Device}
++ end;
++ no_report ->
+ {proceed,Device}
+ end.
+
+ find_report([{No, _Type, _Descr, _Date, Fname, FilePosition}|_T], No) ->
+ {Fname, FilePosition};
+-find_report([_H|T], No) -> find_report(T, No);
++find_report([_H|T], No) ->
++ find_report(T, No);
+ find_report([], No) ->
+- io:format("There is no report with number ~p.~n", [No]).
++ io:format("There is no report with number ~p.~n", [No]),
++ no_report.
+
+-print_grep_reports(_Dir, [], _RegExp, Device, Abort, Log) ->
++print_grep_reports(_Dir, [], _RegExp, Device, _Abort, _Log) ->
+ Device;
+ print_grep_reports(Dir, Data, RegExp, Device, Abort, Log) ->
+ {Next,Device1} = print_grep_report(Dir, Data, element(1, hd(Data)),