diff --git a/terminal-dashboard/table.bash b/terminal-dashboard/table.bash index 17b3b3dbe..c3a232f2e 100755 --- a/terminal-dashboard/table.bash +++ b/terminal-dashboard/table.bash @@ -140,7 +140,11 @@ do if [[ $ARCH == "i386" && $VER == "focal" ]]; then PKG_VERSION="disabled" else - PKG_VERSION=$(wget -qO- http://packages.osrfoundation.org/gazebo/${DISTRO}-${PACKAGE_REPO}/dists/${VER}/main/binary-${ARCH}/Packages | grep -1 "Source: ${LIB}" | sed -n 's/^Version: \(.*\)/\1/p' | uniq) + # The Source field is not mandatory and it is probably not present when + # the binary package has the same name than the source package + PKG_VERSION=$(wget -qO- http://packages.osrfoundation.org/gazebo/${DISTRO}-${PACKAGE_REPO}/dists/${VER}/main/binary-${ARCH}/Packages | \ + grep -1 -m 1 -e "Source: ${LIB}" -e "Package: ${LIB}" | \ + sed -n 's/^Version: \(.*\)/\1/p' | uniq) fi PKG_VERSION=${PKG_VERSION%%~*}