chore: remove check for already installed packages before removing (#2763)

* chore: remove check for already installed packages before removing

There is very little point to doing this, if the package isn't installed
that we are trying to remove, then it should simply fail.

* chore: also remove removal check for dx

We don't currently (and probably also won't in the future) remove things
from the base. DX should be an addition.
This commit is contained in:
renner 2026-08-23 17:30:26 +00:00 committed by GitHub
parent 2c1a15e216
commit caaf781326
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 1 additions and 22 deletions

View file

@ -184,15 +184,7 @@ EXCLUDED_PACKAGES=(
podman-docker podman-docker
) )
# Remove excluded packages if they are installed dnf -y remove "${EXCLUDED_PACKAGES[@]}"
if [[ "${#EXCLUDED_PACKAGES[@]}" -gt 0 ]]; then
readarray -t INSTALLED_EXCLUDED < <(rpm -qa --queryformat='%{NAME}\n' "${EXCLUDED_PACKAGES[@]}" 2>/dev/null || true)
if [[ "${#INSTALLED_EXCLUDED[@]}" -gt 0 ]]; then
dnf5 -y remove "${INSTALLED_EXCLUDED[@]}"
else
echo "No excluded packages found to remove."
fi
fi
## Pins and Overrides ## Pins and Overrides
## Use this section to pin packages in order to avoid regressions ## Use this section to pin packages in order to avoid regressions

View file

@ -105,19 +105,6 @@ echo "Installing DX COPR packages with isolated repo enablement..."
copr_install_isolated "karmab/kcli" "kcli" copr_install_isolated "karmab/kcli" "kcli"
copr_install_isolated "ublue-os/packages" "ublue-os-libvirt-workarounds" copr_install_isolated "ublue-os/packages" "ublue-os-libvirt-workarounds"
# DX packages to exclude - common to all versions
EXCLUDED_PACKAGES=()
# Remove excluded packages if they are installed
if [[ "${#EXCLUDED_PACKAGES[@]}" -gt 0 ]]; then
readarray -t INSTALLED_EXCLUDED < <(rpm -qa --queryformat='%{NAME}\n' "${EXCLUDED_PACKAGES[@]}" 2>/dev/null || true)
if [[ "${#INSTALLED_EXCLUDED[@]}" -gt 0 ]]; then
dnf5 -y remove "${INSTALLED_EXCLUDED[@]}"
else
echo "No excluded packages found to remove."
fi
fi
rsync -rvK /ctx/system_files/dx/ / rsync -rvK /ctx/system_files/dx/ /
# Load iptable_nat module for docker-in-docker. # Load iptable_nat module for docker-in-docker.