Bug 217799

Summary: [Flatpak SDK] flatpakutils.py reports "KeyError: 'gcc'" error if using with icecc and toolchains aren't generated yet
Product: WebKit Reporter: Fujii Hironori <Hironori.Fujii>
Component: Tools / TestsAssignee: Philippe Normand <pnormand>
Status: RESOLVED FIXED    
Severity: Normal CC: pnormand, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Fujii Hironori 2020-10-15 18:08:12 PDT
[Flatpak SDK] flatpakutils.py reports "KeyError: 'gcc'" error if using with icecc and toolchains aren't generated yet

I'm using icecc.

$ env | grep -i icecc
CCACHE_PREFIX=icecc
ICECC_SCHEDULER={my scheduler ip addr}

build-webkit reports the following unfriendly error message:

$ ./Tools/Scripts/build-webkit --gtk --release
Building flatpak based environment
Traceback (most recent call last):
  File "/home/fujii/webkit/gb/Tools/Scripts/webkit-flatpak", line 28, in <module>
    sys.exit(WebkitFlatpak.load_from_args().run())
  File "/home/fujii/webkit/gb/Tools/flatpak/flatpakutils.py", line 897, in run
    return self.main()
  File "/home/fujii/webkit/gb/Tools/flatpak/flatpakutils.py", line 886, in main
    result = self.setup_dev_env()
  File "/home/fujii/webkit/gb/Tools/flatpak/flatpakutils.py", line 978, in setup_dev_env
    return self.run_in_sandbox(*self.user_command)
  File "/home/fujii/webkit/gb/Tools/flatpak/flatpakutils.py", line 822, in run_in_sandbox
    toolchain_path = self.icc_version[toolchain_name]
KeyError: 'gcc'
$

WebKitBuild/UserFlatpak/webkit_flatpak_config.json is not generated.
Manually invoking Tools/Scripts/webkit-flatpak --regenerate-toolchains solves the issue.
Comment 1 Philippe Normand 2020-10-16 01:32:59 PDT
Created attachment 411546 [details]
Patch
Comment 2 Fujii Hironori 2020-10-16 13:38:45 PDT
Comment on attachment 411546 [details]
Patch

Thank you.
Comment 3 EWS 2020-10-17 01:16:17 PDT
Committed r268639: <https://trac.webkit.org/changeset/268639>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 411546 [details].
Comment 4 Radar WebKit Bug Importer 2020-10-17 01:17:20 PDT
<rdar://problem/70404732>