diff options
author | Vratko Polak <vrpolak@cisco.com> | 2020-11-05 12:53:51 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@fd.io> | 2020-11-05 12:53:51 +0000 |
commit | 768d8e92082ca4c226bf677f0d17631d4983586c (patch) | |
tree | c14d893a152f1c4add3bf6cd5ee205e4519d56ce /jjb | |
parent | d906c824897108dadf0688538d0aaa46e0024e04 (diff) | |
parent | 8634118a95d00fea5641f39feb5ae91293d3558b (diff) |
Merge "Fix apt-cache show cmd failure on Debian-10"
Diffstat (limited to 'jjb')
-rw-r--r-- | jjb/scripts/setup_vpp_dpdk_dev_env.sh | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/jjb/scripts/setup_vpp_dpdk_dev_env.sh b/jjb/scripts/setup_vpp_dpdk_dev_env.sh index d42af483f..7ba87b3ad 100644 --- a/jjb/scripts/setup_vpp_dpdk_dev_env.sh +++ b/jjb/scripts/setup_vpp_dpdk_dev_env.sh @@ -31,14 +31,17 @@ function setup { if [ "${OS_ID,,}" == "ubuntu" ] || [ "${OS_ID,,}" == "debian" ] ; then if [ "${STREAM}" != "master" ]; then echo "stream '${STREAM}' is not master: replacing packagecloud apt sources list with stream specific list" - sudo rm -f /etc/apt/sources.list.d/fdio_master.list + sudo apt-get -y remove vpp-ext-deps || true + sudo rm -f /etc/apt/sources.list.d/fdio_master.list curl -s $INSTALL_URL/script.deb.sh | sudo bash fi sudo apt-get update -qq || true - curr_vpp_ext_deps="/root/Downloads/$(basename $(apt-cache show vpp-ext-deps | grep Filename | head -1 | cut -d' ' -f2))" - if [ -f "$curr_vpp_ext_deps" ] ; then - echo "Installing cached vpp-ext-deps pkg: $curr_vpp_ext_deps" - sudo dpkg -i $curr_vpp_ext_deps + local vpp_ext_deps_version="$(apt-cache show vpp-ext-deps | mawk '/Version/ {print $2}' | head -1)" + local vpp_ext_deps_arch="$(apt-cache show vpp-ext-deps | mawk '/Architecture/ {print $2}' | head -1)" + local vpp_ext_deps_pkg="/root/Downloads/vpp-ext-deps_${vpp_ext_deps_version}_${vpp_ext_deps_arch}.deb" + if [ -f "$vpp_ext_deps_pkg" ] ; then + echo "Installing cached vpp-ext-deps pkg: $vpp_ext_deps_pkg" + sudo dpkg -i $vpp_ext_deps_pkg else echo "Installing vpp-ext-deps from packagecloud.io" local force_opts="--allow-downgrades --allow-remove-essential" |