Title: [259453] trunk/Tools
Revision
259453
Author
[email protected]
Date
2020-04-03 04:10:37 -0700 (Fri, 03 Apr 2020)

Log Message

[Flatpak SDK] Create platform/Release directory only when build-webkit is called
https://bugs.webkit.org/show_bug.cgi?id=209954

Reviewed by Philippe Normand.

* flatpak/flatpakutils.py:
(WebkitFlatpak.clean_args): Remove creation of self.build_path.
(WebkitFlatpak.run_in_sandbox): Create self.build_path if command is
build-webkit.

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (259452 => 259453)


--- trunk/Tools/ChangeLog	2020-04-03 10:46:02 UTC (rev 259452)
+++ trunk/Tools/ChangeLog	2020-04-03 11:10:37 UTC (rev 259453)
@@ -1,3 +1,15 @@
+2020-04-03  Diego Pino Garcia  <[email protected]>
+
+        [Flatpak SDK] Create platform/Release directory only when build-webkit is called
+        https://bugs.webkit.org/show_bug.cgi?id=209954
+
+        Reviewed by Philippe Normand.
+
+        * flatpak/flatpakutils.py:
+        (WebkitFlatpak.clean_args): Remove creation of self.build_path.
+        (WebkitFlatpak.run_in_sandbox): Create self.build_path if command is
+        build-webkit.
+
 2020-04-03  Philippe Normand  <[email protected]>
 
         [Flatpak SDK] build-webkit --flatpak-cmakeargs option is ignored

Modified: trunk/Tools/flatpak/flatpakutils.py (259452 => 259453)


--- trunk/Tools/flatpak/flatpakutils.py	2020-04-03 10:46:02 UTC (rev 259452)
+++ trunk/Tools/flatpak/flatpakutils.py	2020-04-03 11:10:37 UTC (rev 259453)
@@ -471,11 +471,6 @@
 
         build_root = os.path.join(self.source_root, 'WebKitBuild')
         self.build_path = os.path.join(build_root, self.platform, self.build_type)
-        try:
-            os.makedirs(self.build_path)
-        except OSError as e:
-            if e.errno != errno.EEXIST:
-                raise e
         self.config_file = os.path.join(self.flatpak_build_path, 'webkit_flatpak_config.json')
 
         Console.quiet = self.quiet
@@ -580,11 +575,19 @@
                            # white-list it in /run, hoping this is the right
                            # path.
                            "--bind-mount=/run/systemd/journal=/run/systemd/journal",
-                           "--bind-mount=%s=%s" % (self.sandbox_source_root, self.source_root),
-                           # We mount WebKitBuild/PORTNAME/BuildType to /app/webkit/WebKitBuild/BuildType
-                           # so we can build WPE and GTK in a same source tree.
-                           "--bind-mount=%s=%s" % (sandbox_build_path, self.build_path)]
+                           "--bind-mount=%s=%s" % (self.sandbox_source_root, self.source_root)]
 
+        if args and args[0].endswith("build-webkit"):
+            # Ensure self.build_path exists.
+            try:
+                os.makedirs(self.build_path)
+            except OSError as e:
+                if e.errno != errno.EEXIST:
+                    raise e
+            # We mount WebKitBuild/PORTNAME/BuildType to /app/webkit/WebKitBuild/BuildType
+            # so we can build WPE and GTK in a same source tree.
+            flatpak_command.append("--bind-mount=%s=%s" % (sandbox_build_path, self.build_path))
+
         forwarded = {
             "WEBKIT_TOP_LEVEL": "/app/",
             "TEST_RUNNER_INJECTED_BUNDLE_FILENAME": os.path.join(sandbox_build_path, "lib/libTestRunnerInjectedBundle.so"),
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to