Use package location for apt-cache show command
[csit.git] / resources / libraries / bash / function / artifacts.sh
index fe300d1..fc9c886 100644 (file)
@@ -86,7 +86,9 @@ function download_ubuntu_artifacts () {
                }
     if [ -z "${VPP_VERSION-}" ]; then
         # If version is not specified, find out the most recent version
-        VPP_VERSION=$(apt-cache --no-all-versions show vpp | grep Version: | \
+        VPP_VERSION=$(apt-cache -o Dir::Etc::SourceList=${apt_fdio_repo_file} \
+                      -o Dir::Etc::SourceParts=${apt_fdio_repo_file} \
+                      --no-all-versions show vpp | grep Version: | \
                       cut -d " " -f 2) || {
                           die "Retrieval of most recent VPP version failed."
                       }