Title: [236261] trunk/Tools
- Revision
- 236261
- Author
- [email protected]
- Date
- 2018-09-20 09:12:30 -0700 (Thu, 20 Sep 2018)
Log Message
[WPE][GTK] webkit-flatpak intercepts --help for other commands
https://bugs.webkit.org/show_bug.cgi?id=189058
The approach of run_in_sandbox_if_available is that we basically have the
same set of arguments to setup the sandbox (ie. port name, build type, etc...)
and we can pass those args first to setup the flatpak launcher object
and then to the underlying script. That doesn't work well with the `--help` argument
as once processed it 1. prints the help (which make no sense to the user of the calling script)
2. exits the app - The solution is to just make sure that `--help` is not used when using
flatpakutils from any script that is not `webkit-flatpak` itself.
Patch by Thibault Saunier <[email protected]> on 2018-09-20
Reviewed by Michael Catanzaro.
* flatpak/flatpakutils.py:
(WebkitFlatpak.load_from_args):
(run_in_sandbox_if_available):
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (236260 => 236261)
--- trunk/Tools/ChangeLog 2018-09-20 16:10:31 UTC (rev 236260)
+++ trunk/Tools/ChangeLog 2018-09-20 16:12:30 UTC (rev 236261)
@@ -1,3 +1,22 @@
+2018-09-20 Thibault Saunier <[email protected]>
+
+ [WPE][GTK] webkit-flatpak intercepts --help for other commands
+ https://bugs.webkit.org/show_bug.cgi?id=189058
+
+ The approach of run_in_sandbox_if_available is that we basically have the
+ same set of arguments to setup the sandbox (ie. port name, build type, etc...)
+ and we can pass those args first to setup the flatpak launcher object
+ and then to the underlying script. That doesn't work well with the `--help` argument
+ as once processed it 1. prints the help (which make no sense to the user of the calling script)
+ 2. exits the app - The solution is to just make sure that `--help` is not used when using
+ flatpakutils from any script that is not `webkit-flatpak` itself.
+
+ Reviewed by Michael Catanzaro.
+
+ * flatpak/flatpakutils.py:
+ (WebkitFlatpak.load_from_args):
+ (run_in_sandbox_if_available):
+
2018-09-20 Xabier Rodriguez Calvar <[email protected]>
Unreviewed. Add W3C imported tests to the MSEEME watchlist.
Modified: trunk/Tools/flatpak/flatpakutils.py (236260 => 236261)
--- trunk/Tools/flatpak/flatpakutils.py 2018-09-20 16:10:31 UTC (rev 236260)
+++ trunk/Tools/flatpak/flatpakutils.py 2018-09-20 16:12:30 UTC (rev 236261)
@@ -463,10 +463,10 @@
class WebkitFlatpak:
@staticmethod
- def load_from_args(args=None):
+ def load_from_args(args=None, add_help=True):
self = WebkitFlatpak()
- parser = argparse.ArgumentParser(prog="webkit-flatpak")
+ parser = argparse.ArgumentParser(prog="webkit-flatpak", add_help=add_help)
general = parser.add_argument_group("General")
general.add_argument('--verbose', action='',
help='Show debug message')
@@ -856,7 +856,7 @@
if not check_flatpak(verbose=False):
return None
- flatpak_runner = WebkitFlatpak.load_from_args(args)
+ flatpak_runner = WebkitFlatpak.load_from_args(args, add_help=False)
if not flatpak_runner.clean_args():
return None
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes