1
0
mirror of https://github.com/ceph/ceph synced 2025-03-25 11:48:05 +00:00

install-deps.sh: copy ubuntu/apt retry logic from run-make.sh

Copy the logic from run-make.sh into install-deps.sh so that we can later
remove it from run-make.sh. It helps prevent breakage when apt-get is
interrupted.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
(cherry picked from commit e8b370a9c7)
This commit is contained in:
John Mulligan 2022-10-03 15:08:30 -04:00
parent 63530dfbe1
commit 192d26bd7a

View File

@ -428,7 +428,16 @@ else
# up in a broken case.
clean_boost_on_ubuntu
if [ "$INSTALL_EXTRA_PACKAGES" ]; then
$SUDO apt-get install -y $INSTALL_EXTRA_PACKAGES
if ! $SUDO apt-get install -y $INSTALL_EXTRA_PACKAGES ; then
# try again. ported over from run-make.sh (orignally e278295)
# In the case that apt-get is interrupted, like when a jenkins
# job is cancelled, the package manager will be in an inconsistent
# state. Run the command again after `dpkg --configure -a` to
# bring package manager back into a clean state.
$SUDO dpkg --configure -a
in_jenkins && echo "CI_DEBUG: trying to install $INSTALL_EXTRA_PACKAGES again"
$SUDO apt-get install -y $INSTALL_EXTRA_PACKAGES
fi
fi
$SUDO apt-get install -y devscripts equivs
$SUDO apt-get install -y dpkg-dev