- local shaman_url="https://shaman.ceph.com/api/repos/${project}/master/${sha1}/ubuntu/${codename}/repo"
- $SUDO curl --silent --location $shaman_url --output /etc/apt/sources.list.d/$project.list
- $SUDO env DEBIAN_FRONTEND=noninteractive apt-get update -y -o Acquire::Languages=none -o Acquire::Translation=none || true
- $SUDO env DEBIAN_FRONTEND=noninteractive apt-get install --allow-unauthenticated -y $missing_pkgs
+ local shaman_url="https://shaman.ceph.com/api/repos/${project}/master/${sha1}/ubuntu/${codename}/repo"
+ in_jenkins && echo -n "CI_DEBUG: Downloading $shaman_url ... "
+ $SUDO curl --silent --fail --write-out "%{http_code}" --location $shaman_url --output /etc/apt/sources.list.d/$project.list
+ $SUDO env DEBIAN_FRONTEND=noninteractive apt-get update -y -o Acquire::Languages=none -o Acquire::Translation=none || true
+ $SUDO env DEBIAN_FRONTEND=noninteractive apt-get install --allow-unauthenticated -y $missing_pkgs
+ fi
+}
+
+boost_ver=1.79
+
+function clean_boost_on_ubuntu {
+ in_jenkins && echo "CI_DEBUG: Running clean_boost_on_ubuntu() in install-deps.sh"
+ # Find currently installed version. If there are multiple
+ # versions, they end up newline separated
+ local installed_ver=$(apt -qq list --installed ceph-libboost*-dev 2>/dev/null |
+ cut -d' ' -f2 |
+ cut -d'.' -f1,2 |
+ sort -u)
+ # If installed_ver contains whitespace, we can't really count on it,
+ # but otherwise, bail out if the version installed is the version
+ # we want.
+ if test -n "$installed_ver" &&
+ echo -n "$installed_ver" | tr '[:space:]' ' ' | grep -v -q ' '; then
+ if echo "$installed_ver" | grep -q "^$boost_ver"; then
+ return
+ fi
+ fi
+
+ # Historical packages
+ $SUDO rm -f /etc/apt/sources.list.d/ceph-libboost*.list
+ # Currently used
+ $SUDO rm -f /etc/apt/sources.list.d/libboost.list
+ # Refresh package list so things aren't in the available list.
+ $SUDO env DEBIAN_FRONTEND=noninteractive apt-get update -y || true
+ # Remove all ceph-libboost packages. We have an early return if
+ # the desired version is already (and the only) version installed,
+ # so no need to spare it.
+ if test -n "$installed_ver"; then
+ $SUDO env DEBIAN_FRONTEND=noninteractive apt-get -y --fix-missing remove "ceph-libboost*"