Skip to content

Commit

Permalink
smhp: fix issue #243
Browse files Browse the repository at this point in the history
  • Loading branch information
Verdi March committed Apr 5, 2024
1 parent ce37801 commit 746be4b
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,12 @@

set -exuo pipefail

dpkg_hold_with_retry() {
# Retry when dpkg frontend is locked
for (( i=0; i<=20; i++ )); do
echo "$1 hold" | sudo dpkg --set-selections && break || { echo To retry... ; sleep 6 ; }
done
}

# Don't let new lustre client module brings in new kernel.
echo "lustre-client-modules-aws hold" | sudo dpkg --set-selections
dpkg_hold_with_retry lustre-client-modules-aws
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,13 @@ apt-cache show ${MOCK_PKG}=${DRV_VERSION}-0ubuntu1 \
&> ${MOCK_PKG}

equivs-build ${MOCK_PKG}
dpkg -i ${MOCK_PKG}_*.deb
echo "${MOCK_PKG} hold" | sudo dpkg --set-selections
apt install -y -o DPkg::Lock::Timeout=120 ./${MOCK_PKG}_*.deb

dpkg_hold_with_retry() {
# Retry when dpkg frontend is locked
for (( i=0; i<=20; i++ )); do
echo "$1 hold" | sudo dpkg --set-selections && break || { echo To retry... ; sleep 6 ; }
done
}
dpkg_hold_with_retry ${MOCK_PKG}

0 comments on commit 746be4b

Please sign in to comment.