aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPavel Moravec <pmoravec@redhat.com>2024-02-16 08:44:04 +0100
committerJake Hunsaker <jacob.r.hunsaker@gmail.com>2024-02-16 15:41:50 -0500
commite306dd93ba5b7a431e23dc4f1af2b65e59267076 (patch)
tree43ca7cbc00877d416b703cb6abb409a3d853b32b
parentaf556b33b0e8c1e1d6ec69e67c79a96cecce1ffa (diff)
downloadsos-e306dd93ba5b7a431e23dc4f1af2b65e59267076.tar.gz
[flatpak] Prevent flatpak commands to mount gvfs
Running various flatpak commands can start gvfs mount, which is undesirable outcome of sos. Calling the commands with GVFS_REMOTE_VOLUME_MONITOR_IGNORE=1 env.variable prevents that behaviour. Relevant: RHEL-14328 Closes: #3528 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
-rw-r--r--sos/report/plugins/flatpak.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/sos/report/plugins/flatpak.py b/sos/report/plugins/flatpak.py
index dfa26252..7aeb8cec 100644
--- a/sos/report/plugins/flatpak.py
+++ b/sos/report/plugins/flatpak.py
@@ -19,6 +19,7 @@ class Flatpak(Plugin, IndependentPlugin):
packages = ("flatpak",)
def setup(self):
+ env = {"GVFS_REMOTE_VOLUME_MONITOR_IGNORE": "1"}
self.add_cmd_output([
"flatpak --version",
"flatpak --default-arch",
@@ -31,8 +32,8 @@ class Flatpak(Plugin, IndependentPlugin):
"flatpak list --runtime --show-details",
"flatpak list --app --show-details",
"flatpak history --columns=all",
- ])
+ ], env=env)
if self.get_option("verify"):
- self.add_cmd_output("flatpak repair --dry-run")
+ self.add_cmd_output("flatpak repair --dry-run", env=env)
# vim: set et ts=4 sw=4 :