Skip to content

Commit

Permalink
linux: Detect unofficial Flatpaks
Browse files Browse the repository at this point in the history
This is a quick and dirty detection that assumes that if a distribution
were to package their own Flatpak, they would also use their own custom
built runtime (we already have one such example).

A "proper" detection would involve changing how and what OBS logs about
the Flatpak environment and use that instead. Since that requires some
additional considerations, that is out of scope for now.
  • Loading branch information
mihawk90 committed Jan 29, 2025
1 parent 1b37601 commit 5cbc079
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion checks/linux.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,11 @@ def checkDistro(lines):
def checkFlatpak(lines):
isFlatpak = search('Flatpak Runtime:', lines)

if len(isFlatpak) > 0:
if isFlatpak and ('org.kde.Platform' not in isFlatpak[0]) and ('org.freedesktop.Platform' not in isFlatpak[0]):
return [LEVEL_WARNING, "Unofficial Flatpak",
"You are using an unofficial Flatpak package. Please file issues with the packager.<br><br>OBS may be unable to assist with issues arising out of the usage of this package. We recommend following our <a href=\"https://obsproject.com/download#linux\">Install Instructions</a> instead."]

if isFlatpak:
return [LEVEL_INFO, "Flatpak",
"You are using the Flatpak. Plugins are available as Flatpak extensions, which you can find in your Distribution's Software Center or via <code>flatpak search com.obsproject.Studio</code>. Installation of external plugins is not supported."]

Expand Down

0 comments on commit 5cbc079

Please sign in to comment.