Skip to content

Commit

Permalink
chore(akmods): Ditch determining akmods from RPM Fusion logic
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
fiftydinar authored Oct 6, 2024
1 parent 079ca81 commit 670fded
Showing 1 changed file with 4 additions and 20 deletions.
24 changes: 4 additions & 20 deletions modules/akmods/akmods.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -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

0 comments on commit 670fded

Please sign in to comment.