Summary: | [WPE][GTK] webkit-flatpak intercepts --help for other commands | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Michael Catanzaro <mcatanzaro> | ||||||
Component: | WebKitGTK | Assignee: | Thibault Saunier <tsaunier> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | aboya, bugs-noreply, commit-queue, mcatanzaro, tsaunier | ||||||
Priority: | P2 | ||||||||
Version: | Other | ||||||||
Hardware: | PC | ||||||||
OS: | Linux | ||||||||
Attachments: |
|
Description
Michael Catanzaro
2018-08-28 14:54:06 PDT
This kind of bug usually occurs when someone passes user-provided arguments to a wrapper without a "--" prefix. run-webkit-tests: flatpakutils.run_in_sandbox_if_available(sys.argv) | v flatpakutils.py: def run_in_sandbox_if_available(args): [...] flatpak_runner = WebkitFlatpak.load_from_args(args) | v flatpakutils.py: @staticmethod def load_from_args(args=None): [...] # creates a webkit-flatpak's ArgumentParser _, self.args = parser.parse_known_args(args=args, namespace=self) What is `args` in run_in_sandbox_if_available() supposed to be? On the first invocation I would assume it is the command to be executed, but it's (also?) being parsed as the flags to webkit-flatpak. That's strange to say the least. It seems like the code is trying to mix flatpak flags with the flags for the wrapped executable (we could call it the «flatpakee»?). This was probably intended to make it easy to set flags for both, but it's quite dangerous and as we are seeing now, can't cope with conflicts. I think run-webkit-tests is doing too much, acting as both the wrapper and the wrapped, and that makes it confusing and creates these conflicts. Created attachment 350189 [details]
Patch
Comment on attachment 350189 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=350189&action=review > Tools/ChangeLog:11 > + 2. exists the app - The solution is to just make sure that `--help` is not used when using exits Created attachment 350204 [details]
Patch for landing
Comment on attachment 350204 [details] Patch for landing Clearing flags on attachment: 350204 Committed r236261: <https://trac.webkit.org/changeset/236261> All reviewed patches have been landed. Closing bug. |