From 670fdedfd47ac442d5c980a9e31ae436dbc2acfa Mon Sep 17 00:00:00 2001 From: fiftydinar <65243233+fiftydinar@users.noreply.github.com> Date: Sun, 6 Oct 2024 10:25:36 +0200 Subject: [PATCH] chore(akmods): Ditch determining akmods from RPM Fusion logic Installing & uninstalling RPM Fusion is a quick operation anyway, so there is no need to have manual checks for which akmods require RPM Fusion. So just install the uninstall RPM Fusion repo always. --- modules/akmods/akmods.sh | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/modules/akmods/akmods.sh b/modules/akmods/akmods.sh index 3b12785..44f69f6 100644 --- a/modules/akmods/akmods.sh +++ b/modules/akmods/akmods.sh @@ -5,10 +5,6 @@ ENABLE_AKMODS_REPO() { sed -i 's@enabled=0@enabled=1@g' /etc/yum.repos.d/_copr_ublue-os-akmods.repo } -SET_HIGHER_PRIORITY_AKMODS_REPO() { - echo "priority=90" >> /etc/yum.repos.d/_copr_ublue-os-akmods.repo -} - INSTALL_RPM_FUSION() { rpm-ostree install \ https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-${OS_VERSION}.noarch.rpm \ @@ -31,23 +27,11 @@ INSTALL_PATH=("${INSTALL_PATH[@]/%/*.rpm}") INSTALL_STR=$(echo "${INSTALL_PATH[*]}" | tr -d '\n') # Universal Blue switched from RPMFusion to negativo17 repos -# Determine if RPMFusion for akmod is needed or not (WL & V4L2Loopback akmods currently require RPMFusion) - -rpm_fusion_dependent=false -for akmod in "${INSTALL[@]}"; do - if [[ "${akmod}" =~ ^(wl|v4l2loopback)$ ]]; then - rpm_fusion_dependent=true - fi -done +# WL & V4L2Loopback akmods currently require RPMFusion repo, so we temporarily install then uninstall it echo "Installing akmods" echo "Installing: $(echo "${INSTALL[*]}" | tr -d '\n')" -SET_HIGHER_PRIORITY_AKMODS_REPO ENABLE_AKMODS_REPO -if "${rpm_fusion_dependent}"; then - INSTALL_RPM_FUSION - rpm-ostree install ${INSTALL_STR} - UNINSTALL_RPM_FUSION -else - rpm-ostree install ${INSTALL_STR} -fi +INSTALL_RPM_FUSION +rpm-ostree install ${INSTALL_STR} +UNINSTALL_RPM_FUSION