diff options
author | Micael Karlberg <[email protected]> | 2011-03-17 16:02:02 +0100 |
---|---|---|
committer | Micael Karlberg <[email protected]> | 2011-03-17 16:02:02 +0100 |
commit | 5cba72579ad75f85797aae14fde94fca6acf6406 (patch) | |
tree | dcced80b5816741682d10f77d37e5a059c054e42 /lib/reltool/src/reltool_target.erl | |
parent | c959a0cd5392d356e8bda8d7eb9d0e71a88360b3 (diff) | |
parent | f861b4fdb3fd39e35f2951c53a73b30a98c7f973 (diff) | |
download | otp-5cba72579ad75f85797aae14fde94fca6acf6406.tar.gz otp-5cba72579ad75f85797aae14fde94fca6acf6406.tar.bz2 otp-5cba72579ad75f85797aae14fde94fca6acf6406.zip |
Merge branch 'dev' into bmk/inets/httpc/support_upload_body_streaming/OTP-9094
Conflicts:
lib/inets/doc/src/notes.xml
Fixed release notes after merge.
Diffstat (limited to 'lib/reltool/src/reltool_target.erl')
-rw-r--r-- | lib/reltool/src/reltool_target.erl | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/lib/reltool/src/reltool_target.erl b/lib/reltool/src/reltool_target.erl index dd6f75b9fc..0fcf89a360 100644 --- a/lib/reltool/src/reltool_target.erl +++ b/lib/reltool/src/reltool_target.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2009-2010. All Rights Reserved. +%% Copyright Ericsson AB 2009-2011. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -90,11 +90,11 @@ do_gen_config(#sys{root_dir = RootDir, debug_info = DebugInfo}, InclDefs) -> ErtsItems = - case lists:keysearch(erts, #app.name, Apps) of - {value, Erts} -> - [{erts, do_gen_config(Erts, InclDefs)}]; - false -> - [] + case lists:keyfind(erts, #app.name, Apps) of + false -> + []; + Erts -> + [{erts, do_gen_config(Erts, InclDefs)}] end, AppsItems = [do_gen_config(A, InclDefs) @@ -521,7 +521,6 @@ sort_apps([#app{name = Name, info = Info} = App | Apps], Visited, [], []), - Missing1 = NotFnd1 ++ NotFnd2 ++ Missing, case Uses ++ Incs of [] -> @@ -533,7 +532,7 @@ sort_apps([#app{name = Name, info = Info} = App | Apps], %% The apps in L must be started before the app. %% Check if we have already taken care of some app in L, %% in that case we have a circular dependency. - NewCircular = [N1 || N1 <- L, N2 <- Visited, N1 =:= N2], + NewCircular = [N || #app{name = N} <- L, N2 <- Visited, N =:= N2], Circular1 = case NewCircular of [] -> Circular; _ -> [Name | NewCircular] ++ Circular @@ -558,9 +557,9 @@ sort_apps([], Missing, Circular, _) -> [make_set(Circular), make_set(Missing)]). find_all(CheckingApp, [Name | Names], Apps, Visited, Found, NotFound) -> - case lists:keysearch(Name, #app.name, Apps) of - {value, #app{info = Info} = App} -> - %% It is OK to have a dependecy like + case lists:keyfind(Name, #app.name, Apps) of + #app{info = Info} = App -> + %% It is OK to have a dependency like %% X includes Y, Y uses X. case lists:member(CheckingApp, Info#app_info.incl_apps) of true -> @@ -1232,7 +1231,7 @@ do_eval_spec({strip_beam, File}, _OrigSourceDir, SourceDir, TargetDir) -> reltool_utils:write_file(TargetFile, BeamBin2). cleanup_spec(List, TargetDir) when is_list(List) -> - lists:foreach(fun(F)-> cleanup_spec(F, TargetDir) end, List); + lists:foreach(fun(F) -> cleanup_spec(F, TargetDir) end, List); %% cleanup_spec({source_dir, _SourceDir, Spec}, TargetDir) -> %% cleanup_spec(Spec, TargetDir); cleanup_spec({create_dir, Dir, Files}, TargetDir) -> @@ -1444,8 +1443,8 @@ subst([], _Vars, Result) -> subst_var([$%| Rest], Vars, Result, VarAcc) -> Key = lists:reverse(VarAcc), - case lists:keysearch(Key, 1, Vars) of - {value, {Key, Value}} -> + case lists:keyfind(Key, 1, Vars) of + {Key, Value} -> subst(Rest, Vars, lists:reverse(Value, Result)); false -> subst(Rest, Vars, [$% | VarAcc ++ [$% | Result]]) |