From 4a70d270542becfc6550175a39df58a6fa29e31d Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Tue, 28 May 2024 12:23:00 +0200 Subject: [PATCH] thirdparty/Makefile.am: apply same fix for "make test-deps" as in PR #652 --- thirdparty/Makefile.am | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/thirdparty/Makefile.am b/thirdparty/Makefile.am index 0a55c2ce..7cda1398 100644 --- a/thirdparty/Makefile.am +++ b/thirdparty/Makefile.am @@ -66,7 +66,15 @@ test-deps: ../cpanfile.common ../cpanfile.test carton/bin/carton $(AM_V_at)echo "** Installing Test Dependencies using Carton install" $(AM_V_at)cat ../cpanfile.common ../cpanfile.test > ../cpanfile $(AM_V_at)rm -f ../cpanfile.snapshot - $(AM_V_at)PERL_CPANM_OPT= PERL_CPANM_HOME=$(THIRDPARTY_DIR) PERL5LIB=$(THIRDPARTY_DIR)/carton/lib/perl5 PERL_CARTON_PATH=$(THIRDPARTY_DIR) $(PERL) $(THIRDPARTY_DIR)/carton/bin/carton install + +$(AM_V_at)TRIES=5 ; unset DESTDIR || true ; unset MAKEFLAGS || true ; \ + while ! test -x carton/bin/carton ; do \ + PERL_CPANM_OPT= PERL_CPANM_HOME=$(THIRDPARTY_DIR) PERL5LIB=$(THIRDPARTY_DIR)/carton/lib/perl5 PERL_CARTON_PATH=$(THIRDPARTY_DIR) $(PERL) $(THIRDPARTY_DIR)/carton/bin/carton install \ + && exit ; \ + TRIES="`expr $${TRIES} - 1`" ; \ + if test "$${TRIES}" -lt 1 ; then exit 1 ; fi ; \ + echo "** RETRY Installing/Checking Carton tool (attempts left: $${TRIES})" ; \ + MAKEFLAGS="" ; export MAKEFLAGS ; \ + done $(AM_V_at)rm -f ../cpanfile ../cpanfile.snapshot $(AM_V_at)touch "$@"