Don't raise error when attempting to delete files that don't exist
All checks were successful
Build container image / Build and push image (push) Successful in 30m23s

This commit is contained in:
2025-12-17 19:53:18 +09:00
parent 0e39bc8924
commit 79a855f6b2

View File

@@ -60,12 +60,15 @@ dnf5 distro-sync --skip-unavailable -y --repo='fedora-multimedia' "${OVERRIDES[@
dnf5 versionlock add "${OVERRIDES[@]}"
# Remove additional repositories Fedora comes with out of the box
# And don't raise an error if any of these files does not exist when attempting
# to delete them.
rm \
/etc/yum.repos.d/fedora-cisco-openh264.repo \
/etc/yum.repos.d/google-chrome.repo \
/etc/yum.repos.d/rpmfusion-nonfree-nvidia-driver.repo \
/etc/yum.repos.d/rpmfusion-nonfree-steam.repo \
/etc/yum.repos.d/_copr:copr.fedorainfracloud.org:phracek:PyCharm.repo
/etc/yum.repos.d/_copr:copr.fedorainfracloud.org:phracek:PyCharm.repo \
2>&1
# Add country query to all repo metalinks
# shellcheck disable=SC2016
@@ -101,12 +104,14 @@ dnf5 install -y \
htop
# Delete 1Password and Tailscale repos once packages are installed
# so they don't end up in the final image.
# so they don't end up in the final image, and don't raise an error if any of
# these files does not exist when attempting to delete them.
rm \
/etc/yum.repos.d/1password.repo \
/etc/yum.repos.d/tailscale.repo \
/etc/pki/rpm-gpg/1password.asc \
/etc/pki/rpm-gpg/tailscale.gpg
/etc/pki/rpm-gpg/tailscale.gpg \
2>&1
# Or just disable:
# dnf5 config-manager setopt 1password.enabled=0 tailscale-stable.enabled=0