Skip to content

Commit e4d1d2e

Browse files
author
Paul Whalen
committed
test(bootc): use dnf download for Copr install to handle NEVR mismatch
dnf reinstall --from-repo requires the exact same NEVR in the target repo, which fails when the base image ships a different Release than the Copr snapshot build. dnf install --from-repo won't replace an already-installed package. Switch to dnf download + local install, matching the ostree and compose-RPM patterns. Assisted-by: Claude (Anthropic) Signed-off-by: Paul Whalen <pwhalen@fedoraproject.org>
1 parent 49f8b3e commit e4d1d2e

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

tests/greenboot-bootc-anaconda-iso.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,9 @@ else
326326
RUN (dnf install -y 'dnf5-command(copr)' || dnf install -y 'dnf-command(copr)') && \
327327
dnf copr enable -y packit/fedora-iot-greenboot-rs-${PR_NUMBER} ${COPR_CHROOT} && \
328328
dnf clean metadata && \
329-
(dnf reinstall -y --from-repo='${GREENBOOT_COPR_REPO_ID}' greenboot greenboot-default-health-checks || dnf install -y --from-repo='${GREENBOOT_COPR_REPO_ID}' greenboot greenboot-default-health-checks) && \
329+
dnf download --from-repo='${GREENBOOT_COPR_REPO_ID}' --destdir /tmp/copr-rpms greenboot greenboot-default-health-checks && \
330+
dnf install -y /tmp/copr-rpms/*.rpm && \
331+
rm -rf /tmp/copr-rpms && \
330332
systemctl enable greenboot-healthcheck.service
331333
EOF
332334
fi

tests/greenboot-bootc-qcow2.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,9 @@ else
326326
RUN (dnf install -y 'dnf5-command(copr)' || dnf install -y 'dnf-command(copr)') && \
327327
dnf copr enable -y packit/fedora-iot-greenboot-rs-${PR_NUMBER} ${COPR_CHROOT} && \
328328
dnf clean metadata && \
329-
(dnf reinstall -y --from-repo='${GREENBOOT_COPR_REPO_ID}' greenboot greenboot-default-health-checks || dnf install -y --from-repo='${GREENBOOT_COPR_REPO_ID}' greenboot greenboot-default-health-checks) && \
329+
dnf download --from-repo='${GREENBOOT_COPR_REPO_ID}' --destdir /tmp/copr-rpms greenboot greenboot-default-health-checks && \
330+
dnf install -y /tmp/copr-rpms/*.rpm && \
331+
rm -rf /tmp/copr-rpms && \
330332
systemctl enable greenboot-healthcheck.service
331333
EOF
332334
fi

0 commit comments

Comments
 (0)