Skip to content

Commit 6bd0d68

Browse files
authored
Unrolled build for #145815
Rollup merge of #145815 - jieyouxu:pr-check-timeout, r=marcoieni Wait for DPkg frontend lock when trying to remove packages Hopefully this helps with [#t-infra > pr-check-1 fails on "free up disk space"](https://rust-lang.zulipchat.com/#narrow/channel/242791-t-infra/topic/pr-check-1.20fails.20on.20.22free.20up.20disk.20space.22/with/535794424). As suggested by riking in [#t-infra > pr-check-1 fails on "free up disk space" @ 💬](https://rust-lang.zulipchat.com/#narrow/channel/242791-t-infra/topic/pr-check-1.20fails.20on.20.22free.20up.20disk.20space.22/near/535791579), thanks! r? infra-ci
2 parents ace9a74 + cce9479 commit 6bd0d68

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/ci/scripts/free-disk-space-linux.sh

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -221,10 +221,13 @@ cleanPackages() {
221221
)
222222
fi
223223

224-
sudo apt-get -qq remove -y --fix-missing "${packages[@]}"
224+
WAIT_DPKG_LOCK="-o DPkg::Lock::Timeout=60"
225+
sudo apt-get ${WAIT_DPKG_LOCK} -qq remove -y --fix-missing "${packages[@]}"
225226

226-
sudo apt-get autoremove -y || echo "::warning::The command [sudo apt-get autoremove -y] failed"
227-
sudo apt-get clean || echo "::warning::The command [sudo apt-get clean] failed failed"
227+
sudo apt-get ${WAIT_DPKG_LOCK} autoremove -y \
228+
|| echo "::warning::The command [sudo apt-get autoremove -y] failed"
229+
sudo apt-get ${WAIT_DPKG_LOCK} clean \
230+
|| echo "::warning::The command [sudo apt-get clean] failed"
228231
}
229232

230233
# Remove Docker images.

0 commit comments

Comments
 (0)