FIX: Selecting VPP packages 52/18052/2
authorPeter Mikus <pmikus@cisco.com>
Wed, 6 Mar 2019 09:31:19 +0000 (09:31 +0000)
committerPeter Mikus <pmikus@cisco.com>
Wed, 6 Mar 2019 09:32:38 +0000 (09:32 +0000)
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 <truncated...//pm>

This patch will select latest as the behavior is result of
re-merge effect.

Change-Id: I8ce21244e2b05e60af0ea51107f9138173844330
Signed-off-by: Peter Mikus <pmikus@cisco.com>
resources/libraries/bash/function/artifacts.sh

index a403cfe..04db2d0 100644 (file)
@@ -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)

©2016 FD.io a Linux Foundation Collaborative Project. All Rights Reserved.
Linux Foundation is a registered trademark of The Linux Foundation. Linux is a registered trademark of Linus Torvalds.
Please see our privacy policy and terms of use.