Bug 221070 - [Flatpak SDK] Flatpak environment JSON is prematurely deleted with flatpak-spawn calls
Summary: [Flatpak SDK] Flatpak environment JSON is prematurely deleted with flatpak-sp...
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Lauro Moura
Keywords: InRadar
Depends on:
Reported: 2021-01-27 17:22 PST by Lauro Moura
Modified: 2021-02-10 12:42 PST (History)
3 users (show)

See Also:

Initial patch (2.00 KB, patch)
2021-01-27 17:39 PST, Lauro Moura
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Lauro Moura 2021-01-27 17:22:37 PST
r271938 added a flatpak_env.json file to forward some variables to webkit-bwrap after flatpak 1.10 changes.

This is working fine most of the time, but if flatpak-spawn is used to invoke a command from the host into the flatpak again (e.g. calling coredumpctl when a layout test fails), the new webkit-flatpak invocation may overwrite the file and delete it when exiting.

This could cause the finally block in the first flatpak process to fail with:

Traceback (most recent call last):
  File "./Tools/Scripts/run-webkit-tests", line 42, in <module>
  File "./Tools/flatpak/flatpakutils.py", line 1124, in run_in_sandbox_if_available
  File "./Tools/flatpak/flatpakutils.py", line 877, in run_in_sandbox
OSError: [Errno 2] No such file or directory: '/home/lauro/dev/WebKit/WebKitBuild/flatpak-env.json'
Comment 1 Lauro Moura 2021-01-27 17:39:10 PST
Created attachment 418603 [details]
Initial patch
Comment 2 EWS 2021-01-28 10:26:58 PST
Committed r272018: <https://trac.webkit.org/changeset/272018>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 418603 [details].
Comment 3 Radar WebKit Bug Importer 2021-01-28 10:27:19 PST