From: Dave Wallace Date: Wed, 8 Mar 2023 18:53:32 +0000 (-0500) Subject: hs-test: fix install-deps X-Git-Tag: v23.10-rc0~156 X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=f72bb6fb242daea784ccefe6d086adeb73e3b859;p=vpp.git hs-test: fix install-deps - Skip addition of docker apt source/key if already installed. Type: fix Signed-off-by: Dave Wallace Change-Id: I747e4dd5e79e23b64e6eb11c6a9348e2ae1a157f --- diff --git a/extras/hs-test/Makefile b/extras/hs-test/Makefile index eb2461dfc67..c7fdc4ea65a 100644 --- a/extras/hs-test/Makefile +++ b/extras/hs-test/Makefile @@ -82,12 +82,16 @@ build-debug: .deps.ok build-vpp-debug build-go .PHONY: install-deps install-deps: @rm -f .deps.ok - @apt update -y \ - && apt install -y apt-transport-https ca-certificates curl software-properties-common \ - && curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg \ - && echo "deb [arch=$(ARCH) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(UBUNTU_CODENAME) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null \ - && apt update \ - && apt install -y golang docker-ce apache2-utils wrk bridge-utils + @apt-get update \ + && apt-get install -y apt-transport-https ca-certificates curl software-properties-common \ + && apt-get install -y golang apache2-utils wrk bridge-utils + @if [ ! -f /usr/share/keyrings/docker-archive-keyring.gpg ] ; then \ + curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg; \ + echo "deb [arch=$(ARCH) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(UBUNTU_CODENAME) stable" \ + | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null ; \ + apt-get update; \ + fi + @apt-get install -y docker-ce @touch .deps.ok .PHONY: fixstyle