WIP: AE_DISABLE_CUCKOO env var support #36

Draft
uwiger wants to merge 3 commits from GH-2959-running-on-termux into master
Showing only changes of commit a7b1a70e42 - Show all commits

29
rebar.lock.script Normal file
View File

@ -0,0 +1,29 @@
%% -*- 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.