chore(default-flatpaks): Don't quit Gnome Software if it's not installed & adjust fedora-third-party messaging

If `fedora-third-party` package is removed, then there's no need to disable the Fedora 3rd party repos through `fedora-third-party` CLI.
This commit is contained in:
fiftydinar 2025-05-16 13:24:56 +02:00 committed by GitHub
parent 7b80afde4c
commit 128de83a78
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -43,14 +43,16 @@ done
if rpm -q fedora-third-party &>/dev/null; then
if [[ ! "$(fedora-third-party query)" == *"disabled." ]]; then
echo "Disabling Fedora third-party repos..."
if command -v gnome-software &> /dev/null; then
/usr/bin/gnome-software --quit
fi
/usr/lib/fedora-third-party/fedora-third-party-opt-out
/usr/bin/fedora-third-party disable
else
echo "Fedora third-party repos are already disabled"
fi
else
echo "ERROR: Cannot opt-out from Fedora third-party repos, because fedora-third-party package is not installed"
echo "There is no need to opt-out from Fedora 3rd party repos, because 'fedora-third-party' package is already removed."
fi
# Remove fedora system remote, unless fedora remote is strictly specified