Swap freeworld packages when installing RPMFusion

This commit is contained in:
2026-01-15 21:48:08 -05:00
parent e40063f7a2
commit 185ad3a710

View File

@@ -575,6 +575,19 @@ install_external_repos() {
install_package --no-install-check \ install_package --no-install-check \
"https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$VERSION_ID.noarch.rpm" "https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$VERSION_ID.noarch.rpm"
fi fi
# Install freeworld mesa packages for better hardware acceleration
for pkg in mesa-va-drivers mesa-vdpau-drivers mesa-vulkan-drivers; do
freeworld_pkg="${pkg}-freeworld"
if ! "${PKG_QUERY[@]}" "$freeworld_pkg" &>/dev/null; then
if "${PKG_QUERY[@]}" "$pkg" &>/dev/null; then
if ! execute sudo dnf swap -y "$pkg" "$freeworld_pkg"; then
err "Package swap failed for $pkg!"
fi
else
"${PKG_INSTALL[@]}" "$freeworld_pkg"
fi
fi
done
;; ;;
suse) : # TODO may be needed if X11_XOrg is made unavailable in default repos suse) : # TODO may be needed if X11_XOrg is made unavailable in default repos
# if ! zypper repos | grep -q "X11_XOrg"; then # if ! zypper repos | grep -q "X11_XOrg"; then
@@ -637,25 +650,6 @@ install_legacy_repo() {
fi fi
} }
# @description Installs mesa-va-drivers-freeworld on Fedora
install_mesa_freeworld() {
debug "${FUNCNAME[0]}()"
local pkg freeworld_pkg
for pkg in mesa-va-drivers mesa-vdpau-drivers mesa-vulkan-drivers; do
freeworld_pkg="${pkg}-freeworld"
if ! "${PKG_QUERY[@]}" "$freeworld_pkg" &>/dev/null; then
if "${PKG_QUERY[@]}" "$pkg" &>/dev/null; then
if ! execute sudo dnf swap -y "$pkg" "$freeworld_pkg"; then
err "Package swap failed for $pkg!"
fi
else
"${PKG_INSTALL[@]}" "$freeworld_pkg"
fi
fi
done
}
# @description Acquires the source DEB package from JRiver # @description Acquires the source DEB package from JRiver
acquire_deb() { acquire_deb() {
debug "${FUNCNAME[0]}()" debug "${FUNCNAME[0]}()"
@@ -686,7 +680,7 @@ acquire_deb() {
fi fi
fi fi
# Download the deb file using the containerized package manager # Download the deb file using containerized package manager
# shellcheck disable=SC2016 # shellcheck disable=SC2016
if ! { if ! {
# Download to /tmp to silence _apt permission warnings # Download to /tmp to silence _apt permission warnings
@@ -1559,7 +1553,7 @@ service_jriver-createrepo() {
"${ENABLE[@]}" "$TIMER_NAME" "${ENABLE[@]}" "$TIMER_NAME"
} }
# @description Detects if MC is installed on btrfs and disables CoW # @description Fixes $HOME/.jriver directory permissions
fix_dotjriver_permissions() { fix_dotjriver_permissions() {
debug "${FUNCNAME[0]}()" debug "${FUNCNAME[0]}()"
@@ -1797,11 +1791,6 @@ main() {
gpgcheck = 0 gpgcheck = 0
name = JRiver Media Center hosted by BryanC name = JRiver Media Center hosted by BryanC
EOF EOF
case $ID in
fedora)
install_mesa_freeworld
;;
esac
;; ;;
debian|ubuntu) debian|ubuntu)
local major_version="${VERSION_ID%%.*}" local major_version="${VERSION_ID%%.*}"
@@ -1901,8 +1890,7 @@ main() {
# Install MC package # Install MC package
case $ID in case $ID in
fedora) install_package --no-install-check --no-gpg-check --allow-downgrades "$MC_RPM"; install_mesa_freeworld ;; fedora|centos|mandriva|suse) install_package --no-install-check --no-gpg-check --allow-downgrades "$MC_RPM" ;;
centos|mandriva|suse) install_package --no-install-check --no-gpg-check --allow-downgrades "$MC_RPM" ;;
debian|ubuntu) install_mc_deb "$@" ;; debian|ubuntu) install_mc_deb "$@" ;;
arch) install_mc_arch ;; arch) install_mc_arch ;;
unknown) install_mc_generic ;; unknown) install_mc_generic ;;