RESOLVED FIXED 218724
[FlatPak] update-webkitgtk-libs fails after a clean build
https://bugs.webkit.org/show_bug.cgi?id=218724
Summary [FlatPak] update-webkitgtk-libs fails after a clean build
Carlos Alberto Lopez Perez
Reported 2020-11-09 14:03:35 PST
Running update-webkitgtk-libs for the first time (after a clean build) fails with this: Flatpak package org.webkit.Platform/x86_64/0.3 not installed. Please update your SDK: Tools/Scripts/update-webkit-flatpak Traceback (most recent call last): File "Tools/Scripts/update-webkit-flatpak", line 28, in <module> sys.exit(WebkitFlatpak.load_from_args(["--update"] + sys.argv[1:]).run()) File "./Tools/flatpak/flatpakutils.py", line 901, in run return self.main() File "./Tools/flatpak/flatpakutils.py", line 893, in main toolchains = self.pack_toolchain(("gcc", "g++"), {"/usr/bin/c++": "/usr/bin/g++"}) File "./Tools/flatpak/flatpakutils.py", line 941, in pack_toolchain icc_version_filename, = re.findall(br'.*creating (.*)', tmpfile.read()) ValueError: need more than 0 values to unpack Died at Tools/Scripts/update-webkitgtk-libs line 28. However, if you re-run the same command twice then it works fine. But the toolchains are not generated. You have to manually re-generate them via the script webkit-flatpak
Attachments
Patch (7.63 KB, patch)
2020-11-09 14:34 PST, Carlos Alberto Lopez Perez
no flags
Carlos Alberto Lopez Perez
Comment 1 2020-11-09 14:34:46 PST
Lauro Moura
Comment 2 2020-11-10 21:38:59 PST
(In reply to Carlos Alberto Lopez Perez from comment #1) > Created attachment 413635 [details] > Patch Just tested it, indeed the error is gone when initializing an empty local repo.
Philippe Normand
Comment 3 2020-11-16 01:59:34 PST
Comment on attachment 413635 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=413635&action=review > Tools/flatpak/flatpakutils.py:948 > + if os.path.isfile(config['icecc_version'][compiler]): This function is called outside of the flatpak sandbox, IIUC, but checks paths inside it, so it might fail if the host gcc or clang paths are different.
Carlos Alberto Lopez Perez
Comment 4 2020-11-17 10:55:35 PST
(In reply to Philippe Normand from comment #3) > Comment on attachment 413635 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=413635&action=review > > > Tools/flatpak/flatpakutils.py:948 > > + if os.path.isfile(config['icecc_version'][compiler]): > > This function is called outside of the flatpak sandbox, IIUC, but checks > paths inside it, so it might fail if the host gcc or clang paths are > different. The paths it checks are the compiler toolchains that are stored under the build directory. For example in my system I have: $ cat WebKitBuild/UserFlatpak/webkit_flatpak_config.json {"icecc_version": {"gcc": "/home/clopez/webkit/WebKitBuild/Toolchains/webkit-sdk-gcc-50ae74637e7fa7354ee261bb26005238.tar.gz", "clang": "/home/clopez/webkit/WebKitBuild/Toolchains/webkit-sdk-clang-7db6a9f1a6756ad6906bac8bcc51fffc.tar.gz"}} AFAIK any path inside the build directory should be valid either inside or outside of the flatpak sandbox. Is there any use case where my assumption would be wrong?
Philippe Normand
Comment 5 2020-11-18 01:20:55 PST
Right, I forgot the paths there correspond to the host.
EWS
Comment 6 2020-11-18 02:45:02 PST
Committed r269949: <https://trac.webkit.org/changeset/269949> All reviewed patches have been landed. Closing bug and clearing flags on attachment 413635 [details].
Radar WebKit Bug Importer
Comment 7 2020-11-18 02:46:19 PST
Note You need to log in before you can comment on or make changes to this bug.