mirror of
https://github.com/ceph/ceph
synced 2025-03-11 02:39: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>
This commit is contained in:
parent
8b529a0d41
commit
e8b370a9c7
@ -395,7 +395,16 @@ else
|
||||
debian|ubuntu|devuan|elementary|softiron)
|
||||
echo "Using apt-get to install dependencies"
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user