Bug 190241

Summary: [WPE][GTK] run-minibrowser improperly creates webkit-flatpak environment
Product: WebKit Reporter: Michael Catanzaro <mcatanzaro>
Component: Tools / TestsAssignee: Michael Catanzaro <mcatanzaro>
Status: RESOLVED FIXED    
Severity: Normal CC: aperez, bugs-noreply, cgarcia, commit-queue, lforschler, mcatanzaro, ross.kirsling, tsaunier, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Other   
Hardware: PC   
OS: Linux   
Bug Depends on:    
Bug Blocks: 191196    
Attachments:
Description Flags
Patch
none
Patch for landing
none
Patch for landing mcatanzaro: commit-queue-

Michael Catanzaro
Reported 2018-10-03 02:42:07 PDT
I'm using a jhbuild environment, NOT webkit-flatpak. Every time I run run-minibrowser it prints this: $ run-minibrowser --gtk You need to install flatpak-builder >= 0.10.0 to be able to use the '/home/mcatanzaro/Projects/WebKit/Tools/Scripts/webkit-flatpak' script. You can find some informations about how to install it for your distribution at: * http://flatpak.org/ And it creates GTK/ and UserFlatpak/ subdirectories under my build directory. If I delete them, they are created again the next time I run run-minibrowser.
Attachments
Patch (2.59 KB, patch)
2018-12-09 15:09 PST, Michael Catanzaro
no flags
Patch for landing (1.04 KB, patch)
2018-12-10 16:01 PST, Adrian Perez
no flags
Patch for landing (1.78 KB, patch)
2018-12-10 16:05 PST, Adrian Perez
mcatanzaro: commit-queue-
Thibault Saunier
Comment 1 2018-10-03 04:06:36 PDT
You somehow have a trailling flatpak env?
Michael Catanzaro
Comment 2 2018-10-03 07:17:16 PDT
No, I delete it before running run-minibrowser. run-minibrowser is creating it.
Michael Catanzaro
Comment 3 2018-11-02 09:24:19 PDT
Thibault, can you look into this please?
Michael Catanzaro
Comment 4 2018-12-09 15:06:33 PST
Problem is flatpakutils.py unconditionally creates the directories, but should do so only when called with --available.
Michael Catanzaro
Comment 5 2018-12-09 15:09:39 PST
Ross Kirsling
Comment 6 2018-12-09 15:13:16 PST
Nice! I noticed this happening for WinCairo too but hadn't looked into why.
WebKit Commit Bot
Comment 7 2018-12-10 06:58:39 PST
Comment on attachment 356930 [details] Patch Clearing flags on attachment: 356930 Committed r239028: <https://trac.webkit.org/changeset/239028>
WebKit Commit Bot
Comment 8 2018-12-10 06:58:41 PST
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 9 2018-12-10 06:59:26 PST
Adrian Perez
Comment 10 2018-12-10 16:00:15 PST
This broke all the Flatpak machinery, any tool that tries to use the utility module will complain with: Traceback (most recent call last): File "/home/aperez/devel/WebKit-ContentBlocking/Tools/Scripts/update-webkitwpe-flatpak", line 28, in <module> WebkitFlatpak.load_from_args(["--wpe", "--update"] + sys.argv[1:]).run() File "/home/aperez/devel/WebKit-ContentBlocking/Tools/flatpak/flatpakutils.py", line 761, in run if not self.clean_args(): File "/home/aperez/devel/WebKit-ContentBlocking/Tools/flatpak/flatpakutils.py", line 574, in clean_args _log.debug("Using flatpak user dir: %s" % os.environ["FLATPAK_USER_DIR"]) File "/home/aperez/.virtualenvs/webkit/lib/python2.7/UserDict.py", line 40, in __getitem__ raise KeyError(key) KeyError: 'FLATPAK_USER_DIR'
Adrian Perez
Comment 11 2018-12-10 16:01:20 PST
Created attachment 357010 [details] Patch for landing
Adrian Perez
Comment 12 2018-12-10 16:05:02 PST
Created attachment 357011 [details] Patch for landing
Michael Catanzaro
Comment 13 2018-12-10 16:20:27 PST
Comment on attachment 357011 [details] Patch for landing This will bring back the original bug. The flatpak directory will be created if flatpak is not in use, and even for ports that don't use flatpak. If it's not enough to move this up to the top of the function, then we'll need to find another way.
Michael Catanzaro
Comment 14 2018-12-10 16:23:23 PST
Yeah it looks like this is only used in clean_args, so I would just move it up to the top of clean_args.
Michael Catanzaro
Comment 15 2018-12-15 09:55:39 PST
Ping, isn't webkit-flatpak unusable until this lands?
Michael Catanzaro
Comment 16 2019-01-01 10:26:24 PST
I guess I'm going to close this, since the original issue is fixed. I know this has broken the flatpak environment, but the fix is quite trivial, as explained in comment #14. Anyone who is actually using the flatpak environment should feel free to test and land that follow-up fix. In the meantime, it's clear nobody besides Adrian has attempted to use the flatpak environment since December 10, at least....
Note You need to log in before you can comment on or make changes to this bug.