Skip to content

Commit

Permalink
openqa-bootstrap: Refresh and retry in case of package changes
Browse files Browse the repository at this point in the history
Packages may be deleted before they can be installed.

See: https://progress.opensuse.org/issues/165024
  • Loading branch information
kalikiana committed Aug 9, 2024
1 parent 549ee3b commit e4c47e1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion script/openqa-bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ if [[ $NAME = "openSUSE Leap" ]]; then
zypper -n --gpg-auto-import-keys refresh
fi

# Ensure we have retry available to handle temporary package issues later
command -v retry >/dev/null || zypper -n --gpg-auto-import-keys in retry

# install packages
pkgs=(qemu-arm qemu-ppc qemu-x86 qemu-tools sudo iputils os-autoinst-distri-opensuse-deps)

Expand All @@ -92,7 +95,8 @@ fi
if zypper -n search -x qemu-hw-display-virtio-gpu-pci; then
pkgs+=(qemu-hw-display-virtio-gpu qemu-hw-display-virtio-gpu-pci)
fi
zypper -n install --no-recommends "${pkgs[@]}"
packages="${pkgs[*]}"
retry -e -s 30 -r 7 -- sh -c "zypper -n --gpg-auto-import-keys ref && zypper -n in --no-recommends $packages"

# setup database
chown -R postgres: /var/lib/pgsql/ # fix broken postgres working dir permissions in the nspawn container
Expand Down

0 comments on commit e4c47e1

Please sign in to comment.