Title: [261079] trunk/Tools
Revision
261079
Author
[email protected]
Date
2020-05-04 01:57:33 -0700 (Mon, 04 May 2020)

Log Message

Unreviewed, reverting r261076.
https://bugs.webkit.org/show_bug.cgi?id=211371

Triggers obscure X11 error on GTK bots (Requested by philn on
#webkit).

Reverted changeset:

"[Flatpak SDK] Query the doc portal path with DBus"
https://bugs.webkit.org/show_bug.cgi?id=211281
https://trac.webkit.org/changeset/261076

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (261078 => 261079)


--- trunk/Tools/ChangeLog	2020-05-04 08:31:17 UTC (rev 261078)
+++ trunk/Tools/ChangeLog	2020-05-04 08:57:33 UTC (rev 261079)
@@ -1,3 +1,17 @@
+2020-05-04  Commit Queue  <[email protected]>
+
+        Unreviewed, reverting r261076.
+        https://bugs.webkit.org/show_bug.cgi?id=211371
+
+        Triggers obscure X11 error on GTK bots (Requested by philn on
+        #webkit).
+
+        Reverted changeset:
+
+        "[Flatpak SDK] Query the doc portal path with DBus"
+        https://bugs.webkit.org/show_bug.cgi?id=211281
+        https://trac.webkit.org/changeset/261076
+
 2020-05-04  Philippe Normand  <[email protected]>
 
         [Flatpak SDK] Support for local repository and drive-by fixes

Modified: trunk/Tools/Scripts/run-bindings-tests (261078 => 261079)


--- trunk/Tools/Scripts/run-bindings-tests	2020-05-04 08:31:17 UTC (rev 261078)
+++ trunk/Tools/Scripts/run-bindings-tests	2020-05-04 08:57:33 UTC (rev 261079)
@@ -33,11 +33,10 @@
 import sys
 from webkitpy.common.system import executive
 
-if sys.platform.startswith('linux'):
-    top_level_directory = os.path.normpath(os.path.join(os.path.dirname(__file__), '..', '..'))
-    sys.path.insert(0, os.path.join(top_level_directory, 'Tools', 'flatpak'))
-    import flatpakutils
-    flatpakutils.run_in_sandbox_if_available(sys.argv)
+top_level_directory = os.path.normpath(os.path.join(os.path.dirname(__file__), '..', '..'))
+sys.path.insert(0, os.path.join(top_level_directory, 'Tools', 'flatpak'))
+import flatpakutils
+flatpakutils.run_in_sandbox_if_available(sys.argv)
 
 def main(argv):
     """Runs WebCore bindings code generators on test IDL files and compares

Modified: trunk/Tools/flatpak/flatpakutils.py (261078 => 261079)


--- trunk/Tools/flatpak/flatpakutils.py	2020-05-04 08:31:17 UTC (rev 261078)
+++ trunk/Tools/flatpak/flatpakutils.py	2020-05-04 08:57:33 UTC (rev 261079)
@@ -34,8 +34,6 @@
 import tempfile
 import re
 
-from gi.repository import Gio, GLib
-
 from webkitpy.common.system.systemhost import SystemHost
 from webkitpy.port.factory import PortFactory
 from webkitpy.common.system.logutils import configure_logging
@@ -688,19 +686,22 @@
                 "--talk-name=org.freedesktop.Flatpak"
             ])
 
-            bus = Gio.bus_get_sync(Gio.BusType.SESSION, None)
-            proxy = Gio.DBusProxy.new_sync(bus, Gio.DBusProxyFlags.NONE, None,
-                                           'org.freedesktop.portal.Documents',
-                                           '/org/freedesktop/portal/documents',
-                                           'org.freedesktop.portal.Documents', None)
-            document_portal_mount_point = proxy.call_sync('GetMountPoint', None, Gio.DBusCallFlags.NONE,
-                                                          GLib.MAXINT, None)
-            uid_doc_path = ''.join([chr(x) for x in document_portal_mount_point.unpack()[0][:-1]])
+            xdg_runtime_dir = os.environ.get('XDG_RUNTIME_DIR', None)
+            if not xdg_runtime_dir:
+                _log.debug('XDG_RUNTIME_DIR not set. Trying default location.')
+                try:
+                    with open(os.devnull, 'w') as devnull:
+                        uid = subprocess.check_output(("id", "-u"), stderr=devnull).decode().strip()
+                        xdg_runtime_dir = '/run/user/{uid}'.format(uid=uid)
+                except subprocess.CalledProcessError:
+                    _log.debug("Could not determine XDG_RUNIME_DIR. This may cause bubblewrap to fail.")
 
-            if os.path.exists(uid_doc_path):
-                flatpak_command.append("--bind-mount={uid_doc_path}={uid_doc_path}".format(uid_doc_path=uid_doc_path))
-            else:
-                _log.debug("Can't find user document path at '{uid_doc_path}'. Not mounting it.".format(uid_doc_path=uid_doc_path))
+            if xdg_runtime_dir:
+                uid_doc_path = os.path.join(xdg_runtime_dir, 'doc')
+                if os.path.exists(uid_doc_path):
+                    flatpak_command.append("--bind-mount={uid_doc_path}={uid_doc_path}".format(uid_doc_path=uid_doc_path))
+                else:
+                    _log.debug("Can't find user document path at '{uid_doc_path}'. Not mounting it.".format(uid_doc_path=uid_doc_path))
 
             sandbox_environment.update({
                 "TZ": "PST8PDT",
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to