Skip to content

Commit

Permalink
[flatpak] Predicate two cmds by gvfs service
Browse files Browse the repository at this point in the history
Two commands "flatpak --installations" and "flatpak --print-updated-env"
can enable user's gvfs-daemon.service even with
GVFS_REMOTE_VOLUME_MONITOR_IGNORE=1 set, so let put them under a
predicate.

Resolves: #3618
Relevant: RHEL-14328

Signed-off-by: Pavel Moravec <[email protected]>
  • Loading branch information
pmoravec committed Apr 24, 2024
1 parent 3b15149 commit 03b61f7
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions sos/report/plugins/flatpak.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#
# See the LICENSE file in the source distribution for further information.

from sos.report.plugins import Plugin, IndependentPlugin
from sos.report.plugins import Plugin, IndependentPlugin, SoSPredicate


class Flatpak(Plugin, IndependentPlugin):
Expand All @@ -20,19 +20,27 @@ class Flatpak(Plugin, IndependentPlugin):

def setup(self):
env = {"GVFS_REMOTE_VOLUME_MONITOR_IGNORE": "1"}
gvfs_pred = SoSPredicate(
self, cmd_outputs={
'cmd': 'systemctl --user status gvfs-daemon.service',
'output': '(running)'
}
)
self.add_cmd_output([
"flatpak --version",
"flatpak --default-arch",
"flatpak --supported-arches",
"flatpak --gl-drivers",
"flatpak --installations",
"flatpak --print-updated-env",
"flatpak config",
"flatpak remote-list --show-details",
"flatpak list --runtime --show-details",
"flatpak list --app --show-details",
"flatpak history --columns=all",
], env=env)
self.add_cmd_output([
"flatpak --installations",
"flatpak --print-updated-env",
], env=env, pred=gvfs_pred)
if self.get_option("verify"):
self.add_cmd_output("flatpak repair --dry-run", env=env)

Expand Down

0 comments on commit 03b61f7

Please sign in to comment.