30 lines
857 B
Erlang
30 lines
857 B
Erlang
%% -*- erlang -*-
|
|
|
|
FilterCheck = (os:getenv("AE_DISABLE_CUCKOO") =/= false),
|
|
RemoveApps = [<<"aecuckoo">>, <<"aecuckooprebuilt">>],
|
|
|
|
Filter = fun(Apps) ->
|
|
case FilterCheck of
|
|
false ->
|
|
Apps;
|
|
true ->
|
|
lists:foldl(
|
|
fun(App, Acc) ->
|
|
lists:keydelete(App, 1, Acc)
|
|
end,
|
|
Apps,
|
|
RemoveApps
|
|
)
|
|
end
|
|
end,
|
|
|
|
case CONFIG of
|
|
[] ->
|
|
%% no lock file present, usually during unlock/upgrade
|
|
CONFIG;
|
|
[{Version, Deps}, [{pkg_hash, Pkgs}]] ->
|
|
Deps1 = Filter(Deps),
|
|
Pkgs1 = Filter(Pkgs),
|
|
[{Version, Deps1}, [{pkg_hash, Pkgs1}]]
|
|
end.
|