Title: [268542] trunk/Tools
- Revision
- 268542
- Author
- [email protected]
- Date
- 2020-10-15 12:09:01 -0700 (Thu, 15 Oct 2020)
Log Message
[Flatpak SDK] Check for installed packages in setup_buildir
https://bugs.webkit.org/show_bug.cgi?id=217768
Reviewed by Philippe Normand.
During a cleanup of one of the bots, setup_builddir failed with a null
self.sdk member, which is set in get_packages.
While I could not reproduce it again, this commit prevents this by
checking whether the packages are installed before continuing the
original setup_builddir steps.
* flatpak/flatpakutils.py:
(WebkitFlatpak.setup_builddir): Check for installed packages.
(WebkitFlatpak.run_in_sandbox): Check for setup_builddir return code.
(WebkitFlatpak.check_installed_packages): Extracted from
setup_dev_env.
(WebkitFlatpak.setup_dev_env): Call extracted method.
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (268541 => 268542)
--- trunk/Tools/ChangeLog 2020-10-15 18:43:29 UTC (rev 268541)
+++ trunk/Tools/ChangeLog 2020-10-15 19:09:01 UTC (rev 268542)
@@ -1,3 +1,24 @@
+2020-10-15 Lauro Moura <[email protected]>
+
+ [Flatpak SDK] Check for installed packages in setup_buildir
+ https://bugs.webkit.org/show_bug.cgi?id=217768
+
+ Reviewed by Philippe Normand.
+
+ During a cleanup of one of the bots, setup_builddir failed with a null
+ self.sdk member, which is set in get_packages.
+
+ While I could not reproduce it again, this commit prevents this by
+ checking whether the packages are installed before continuing the
+ original setup_builddir steps.
+
+ * flatpak/flatpakutils.py:
+ (WebkitFlatpak.setup_builddir): Check for installed packages.
+ (WebkitFlatpak.run_in_sandbox): Check for setup_builddir return code.
+ (WebkitFlatpak.check_installed_packages): Extracted from
+ setup_dev_env.
+ (WebkitFlatpak.setup_dev_env): Call extracted method.
+
2020-10-15 Jonathan Bedard <[email protected]>
[webkitscmpy] Unconditionally extract git-svn-id from commit message
Modified: trunk/Tools/flatpak/flatpakutils.py (268541 => 268542)
--- trunk/Tools/flatpak/flatpakutils.py 2020-10-15 18:43:29 UTC (rev 268541)
+++ trunk/Tools/flatpak/flatpakutils.py 2020-10-15 19:09:01 UTC (rev 268542)
@@ -572,8 +572,11 @@
def setup_builddir(self):
if os.path.exists(os.path.join(self.flatpak_build_path, "metadata")):
- return
+ return True
+ if not self.check_installed_packages():
+ return False
+
self.sdk_repo.flatpak("build-init",
self.flatpak_build_path,
"org.webkit.Webkit",
@@ -581,6 +584,9 @@
str(self.runtime),
self.sdk.branch)
+ return True
+
+
def setup_gstbuild(self, building):
gst_dir = os.environ.get('GST_BUILD_PATH')
if not gst_dir:
@@ -652,7 +658,8 @@
return host_path.replace(self.source_root, self.sandbox_source_root)
def run_in_sandbox(self, *args, **kwargs):
- self.setup_builddir()
+ if not self.setup_builddir():
+ return False
cwd = kwargs.get("cwd", None)
extra_env_vars = kwargs.get("env", {})
stdout = kwargs.get("stdout", sys.stdout)
@@ -945,15 +952,21 @@
sccache_toolchains.append(item)
return sccache_toolchains
+ def check_installed_packages(self):
+ for package in self._get_packages():
+ if package.name.startswith("org.webkit") and not package.is_installed(self.sdk_branch):
+ Console.error_message("Flatpak package %s not installed. Please update your SDK: Tools/Scripts/update-webkit-flatpak", package)
+ return False
+ else:
+ return True
+
+
def setup_dev_env(self):
if not os.path.exists(os.path.join(self.flatpak_build_path, "runtime", "org.webkit.Sdk")) or self.update:
self.install_all()
- if not self.update:
- for package in self._get_packages():
- if package.name.startswith("org.webkit") and not package.is_installed(self.sdk_branch):
- Console.error_message("Flatpak package %s not installed. Please update your SDK: Tools/Scripts/update-webkit-flatpak", package)
- return 1
+ if not self.update and not self.check_installed_packages():
+ return 1
if self.gdb or self.gdb_stack_trace:
return self.run_gdb()
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes