Skip to content

Commit

Permalink
install-deps.sh: copy ubuntu/apt retry logic from run-make.sh
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
phlogistonjohn committed Feb 7, 2023
1 parent 8b529a0 commit e8b370a
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion install-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e8b370a

Please sign in to comment.