From d80984c1036ea81eb1f44b8d7cde85fc09b5e3c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Date: Fri, 26 Mar 2021 15:12:38 +0100 Subject: core/deps.mk: Support Rebar lock files with version "1.2.0" This is the case in erlang-systemd [1]. As far as I can tell, the format is the same for the bits Erlang.mk is interested in. The testsuite is expanded to use version 0.6.0 of erlang-systemd. [1] https://github.com/rabbitmq/erlang-systemd --- core/deps.mk | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'core/deps.mk') diff --git a/core/deps.mk b/core/deps.mk index 6d6623b..afe3f52 100644 --- a/core/deps.mk +++ b/core/deps.mk @@ -382,8 +382,19 @@ define dep_autopatch_rebar.erl case file:consult("$(call core_native_path,$(DEPS_DIR)/$1/rebar.lock)") of {ok, Lock} -> io:format("~p~n", [Lock]), - case lists:keyfind("1.1.0", 1, Lock) of - {_, LockPkgs} -> + LockPkgs = case lists:keyfind("1.2.0", 1, Lock) of + {_, LP} -> + LP; + _ -> + case lists:keyfind("1.1.0", 1, Lock) of + {_, LP} -> + LP; + _ -> + false + end + end, + if + is_list(LockPkgs) -> io:format("~p~n", [LockPkgs]), case lists:keyfind(atom_to_binary(N, latin1), 1, LockPkgs) of {_, {pkg, _, Vsn}, _} -> @@ -392,7 +403,7 @@ define dep_autopatch_rebar.erl _ -> false end; - _ -> + true -> false end; _ -> -- cgit v1.2.3