Title: [263024] trunk/Tools
Revision
263024
Author
[email protected]
Date
2020-06-15 02:09:04 -0700 (Mon, 15 Jun 2020)

Log Message

[Flatpak SDK] Remove webkit-build-directory dependency from flatpakutils
https://bugs.webkit.org/show_bug.cgi?id=213179

Patch by Philippe Normand <[email protected]> on 2020-06-15
Reviewed by Žan Doberšek.

This makes webkit-flatpak usable without installing additional perl modules (version) on the host OS.

* flatpak/flatpakutils.py:
(WebkitFlatpak.load_from_args): Make --release and --debug mutually exclusive, and default to Release builds.
(WebkitFlatpak.__init__):
(WebkitFlatpak.clean_args): No need to pull in webkitpy which pulls webkitdirs.pm only to
determine the default configuration. Assume we use Release by default.

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (263023 => 263024)


--- trunk/Tools/ChangeLog	2020-06-15 08:57:52 UTC (rev 263023)
+++ trunk/Tools/ChangeLog	2020-06-15 09:09:04 UTC (rev 263024)
@@ -1,3 +1,18 @@
+2020-06-15  Philippe Normand  <[email protected]>
+
+        [Flatpak SDK] Remove webkit-build-directory dependency from flatpakutils
+        https://bugs.webkit.org/show_bug.cgi?id=213179
+
+        Reviewed by Žan Doberšek.
+
+        This makes webkit-flatpak usable without installing additional perl modules (version) on the host OS.
+
+        * flatpak/flatpakutils.py:
+        (WebkitFlatpak.load_from_args): Make --release and --debug mutually exclusive, and default to Release builds.
+        (WebkitFlatpak.__init__):
+        (WebkitFlatpak.clean_args): No need to pull in webkitpy which pulls webkitdirs.pm only to
+        determine the default configuration. Assume we use Release by default.
+
 2020-06-15  Paulo Matos  <[email protected]>
 
         Properly propagate TZ to the remote test devices

Modified: trunk/Tools/flatpak/flatpakutils.py (263023 => 263024)


--- trunk/Tools/flatpak/flatpakutils.py	2020-06-15 08:57:52 UTC (rev 263023)
+++ trunk/Tools/flatpak/flatpakutils.py	2020-06-15 09:09:04 UTC (rev 263024)
@@ -34,8 +34,6 @@
 import tempfile
 import re
 
-from webkitpy.common.system.systemhost import SystemHost
-from webkitpy.port.factory import PortFactory
 from webkitpy.common.system.logutils import configure_logging
 import webkitpy.thirdparty.autoinstalled.toml
 import toml
@@ -395,10 +393,12 @@
         general = parser.add_argument_group("General")
         general.add_argument('--verbose', action='',
                              help='Show debug message')
-        general.add_argument("--debug",
-                             help="Compile with Debug configuration, also installs Sdk debug symbols.",
-                             action=""
-        general.add_argument("--release", help="Compile with Release configuration.", action=""
+        type_group = parser.add_mutually_exclusive_group()
+        type_group.add_argument("--debug",
+                                help="Compile with Debug configuration, also installs Sdk debug symbols.",
+                                dest='build_type', action="" const="Debug")
+        type_group.add_argument("--release", help="Compile with Release configuration.",
+                                dest='build_type', action="" const="Release")
         general.add_argument('--gtk', action='', dest='platform', const='gtk',
                              help='Setup build directory for the GTK port')
         general.add_argument('--wpe', action='', dest='platform', const='wpe',
@@ -440,6 +440,9 @@
 
         _, self.args = parser.parse_known_args(args=args, namespace=self)
 
+        if not self.build_type:
+            self.build_type = "Release"
+
         if os.environ.get('CCACHE_PREFIX') == 'icecc':
             self.use_icecream = True
 
@@ -467,7 +470,6 @@
 
         self.sdk_branch = "0.2"
         self.platform = "gtk"
-        self.build_type = "Release"
         self.check_available = False
         self.user_command = []
 
@@ -514,12 +516,6 @@
         configure_logging(logging.DEBUG if self.verbose else logging.INFO)
         _log.debug("Using flatpak user dir: %s" % self.flatpak_build_path)
 
-        if not self.debug and not self.release:
-            factory = PortFactory(SystemHost())
-            port = factory.get(self.platform)
-            self.debug = port.default_configuration() == "Debug"
-
-        self.build_type = "Debug" if self.debug else "Release"
         self.platform = self.platform.upper()
 
         if self.gdb is None and '--gdb' in sys.argv:
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to