From fe7c90f5cc1cff7b4fedab81adb7ae77a920087f Mon Sep 17 00:00:00 2001 From: Peter Mikus Date: Wed, 6 Mar 2019 09:31:19 +0000 Subject: FIX: Selecting VPP packages There is an issue when multiple VPP versions of same commit but different build is in repository. Artifacts.sh will find multiple version and cennot properly download only one. 00:00:46.522 ++ apt-get -y download libvppinfra=19.04-rc0~290-gd4295e61a~b2173 19.04-rc0~290-gd4295e61a~b2172 19.04-rc0~290-gd4295e61a~b2171 libvppinfra-dev=19.04-rc0~290-gd4295e61a~b2173 19.04-rc0~290-gd4295e61a~b2172 19.04-rc0~290-gd4295e61a~b2171 This patch will select latest as the behavior is result of re-merge effect. Change-Id: I8ce21244e2b05e60af0ea51107f9138173844330 Signed-off-by: Peter Mikus --- resources/libraries/bash/function/artifacts.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'resources') diff --git a/resources/libraries/bash/function/artifacts.sh b/resources/libraries/bash/function/artifacts.sh index a403cfe005..04db2d0069 100644 --- a/resources/libraries/bash/function/artifacts.sh +++ b/resources/libraries/bash/function/artifacts.sh @@ -98,7 +98,8 @@ function download_ubuntu_artifacts () { pkg_info=$(apt-cache show ${package}) || { die "apt-cache show on ${package} failed." } - ver=$(echo ${pkg_info} | grep -o "Version: ${VPP_VERSION-}[^ ]*") || true + ver=$(echo ${pkg_info} | grep -o "Version: ${VPP_VERSION-}[^ ]*" \ + head -1) || true if [ -n "${ver-}" ]; then echo "Found '${VPP_VERSION-}' among '${package}' versions." ver=$(echo "$ver" | cut -d " " -f 2) -- cgit 1.2.3-korg