Skip to content

Commit bf54baf

Browse files
committed
ci(fresh-install): the tumbleweed leg refreshes before it installs and stops when the refresh fails
The tumbleweed leg ran `zypper -n install ...` alone. That install refreshes the repositories itself, and when the refresh fails it continues on stale or empty metadata, so the leg went red with Some of the repositories have not been refreshed because of an error. No provider of 'binutils' found. The second line is the one a reader acts on, and it names a package rather than the repository that could not be read. The leg's setup now runs `zypper -n --gpg-auto-import-keys refresh` as its own command, retries it once after 15 seconds, and installs only after it succeeds. A refresh that fails twice ends the step with zypper's own refresh error and status. --gpg-auto-import-keys accepts a repository's new signing key, which `-n` alone rejects on a rolling image. Measured in opensuse/tumbleweed:latest (aarch64) under `sh -e`, as a container step runs: with a repository at an unreachable URL added, both refreshes fail, the install never starts and the step exits 4 after "Some of the repositories have not been refreshed"; without it the refresh succeeds and the install proceeds. Closes #523.
1 parent 304487b commit bf54baf

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

‎.github/workflows/ci-fresh-install.yml‎

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,9 +279,19 @@ jobs:
279279
- distro: arch
280280
image: archlinux:latest
281281
setup: pacman -Sy --noconfirm curl bash tar gzip xz git findutils binutils file
282+
# The refresh is its own command, retried once, and the install runs
283+
# only after it succeeds (#523). `zypper install` refreshes too, but
284+
# when that refresh fails it continues on stale or empty metadata,
285+
# and the leg went red with `No provider of 'binutils' found` --
286+
# naming a package instead of the repository that could not be read.
287+
# A rolling image can meet a repository's new signing key, which
288+
# `-n` alone rejects; --gpg-auto-import-keys accepts it.
282289
- distro: tumbleweed
283290
image: opensuse/tumbleweed:latest
284-
setup: zypper -n install curl bash tar gzip xz git findutils binutils file
291+
setup: >-
292+
{ zypper -n --gpg-auto-import-keys refresh ||
293+
{ sleep 15; zypper -n --gpg-auto-import-keys refresh; }; } &&
294+
zypper -n install curl bash tar gzip xz git findutils binutils file
285295
- distro: debian-testing
286296
image: debian:testing
287297
setup: apt-get update && apt-get -y install curl bash tar gzip xz-utils git ca-certificates binutils findutils file

0 commit comments

Comments
 (0)