WebKit Bugzilla
Attachment 339518 Details for
Bug 185291
: Use subprocess.call instead of os.system to handle path with spaces
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-185291-20180504133752.patch (text/plain), 4.08 KB, created by
Yusuke Suzuki
on 2018-05-03 21:37:53 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Yusuke Suzuki
Created:
2018-05-03 21:37:53 PDT
Size:
4.08 KB
patch
obsolete
>Subversion Revision: 231344 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index d231cfe56bbbaa1111807ccd2f64978ca1e1b040..88e0b130fcf09be9a696e55f93524421f3c3fd39 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,17 @@ >+2018-05-03 Yusuke Suzuki <utatane.tea@gmail.com> >+ >+ Use subprocess.call instead of os.system to handle path with spaces >+ https://bugs.webkit.org/show_bug.cgi?id=185291 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ If gperf path includes spaces, these python scripts fail to execute gperf. >+ We use subprocess module instead of os.system to invoke gperf. >+ >+ * css/makeSelectorPseudoClassAndCompatibilityElementMap.py: >+ * css/makeSelectorPseudoElementsMap.py: >+ * platform/network/create-http-header-name-table: >+ > 2018-05-03 Yusuke Suzuki <utatane.tea@gmail.com> > > Unreviewed, attempt to fix WinCairo build failure >diff --git a/Source/WebCore/css/makeSelectorPseudoClassAndCompatibilityElementMap.py b/Source/WebCore/css/makeSelectorPseudoClassAndCompatibilityElementMap.py >index 78332271ac615695743d3cdaa7f97c9a178767b1..0c300876da75ec93cc519245d3156c8518122f53 100644 >--- a/Source/WebCore/css/makeSelectorPseudoClassAndCompatibilityElementMap.py >+++ b/Source/WebCore/css/makeSelectorPseudoClassAndCompatibilityElementMap.py >@@ -25,6 +25,7 @@ > > import os > import sys >+import subprocess > > > def enumerablePseudoType(stringPseudoType): >@@ -211,7 +212,6 @@ def expand_ifdef_condition(condition): > if 'GPERF' in os.environ: > gperf_command = os.environ['GPERF'] > >-gperf_return = os.system("%s --key-positions=\"*\" -m 10 -s 2 SelectorPseudoClassAndCompatibilityElementMap.gperf --output-file=SelectorPseudoClassAndCompatibilityElementMap.cpp" % gperf_command) >-if gperf_return != 0: >+if subprocess.call([gperf_command, '--key-positions=*', '-m', '10', '-s', '2', 'SelectorPseudoClassAndCompatibilityElementMap.gperf', '--output-file=SelectorPseudoClassAndCompatibilityElementMap.cpp']) != 0: > print("Error when generating SelectorPseudoClassAndCompatibilityElementMap.cpp from SelectorPseudoClassAndCompatibilityElementMap.gperf :(") > sys.exit(gperf_return) >diff --git a/Source/WebCore/css/makeSelectorPseudoElementsMap.py b/Source/WebCore/css/makeSelectorPseudoElementsMap.py >index 83b238e2f46d43b48404012c05dd7609160aaf72..2c9276c981e109d8956367f7f4bb891d2e8fe91b 100644 >--- a/Source/WebCore/css/makeSelectorPseudoElementsMap.py >+++ b/Source/WebCore/css/makeSelectorPseudoElementsMap.py >@@ -25,6 +25,7 @@ > > import os > import sys >+import subprocess > > > def enumerablePseudoType(stringPseudoType): >@@ -206,7 +207,6 @@ def expand_ifdef_condition(condition): > if 'GPERF' in os.environ: > gperf_command = os.environ['GPERF'] > >-gperf_return = os.system("%s --key-positions=\"*\" -m 10 -s 2 SelectorPseudoElementTypeMap.gperf --output-file=SelectorPseudoElementTypeMap.cpp" % gperf_command) >-if gperf_return != 0: >+if subprocess.call([gperf_command, '--key-positions=*', '-m', '10', '-s', '2', 'SelectorPseudoElementTypeMap.gperf', '--output-file=SelectorPseudoElementTypeMap.cpp']) != 0: > print("Error when generating SelectorPseudoElementTypeMap.cpp from SelectorPseudoElementTypeMap.gperf :(") > sys.exit(gperf_return) >diff --git a/Source/WebCore/platform/network/create-http-header-name-table b/Source/WebCore/platform/network/create-http-header-name-table >index 755d22e94687a92ff327d9813ebd2e790a8d1827..1d4ebcaebd733cd86444325f1e8710ae9dbaea43 100755 >--- a/Source/WebCore/platform/network/create-http-header-name-table >+++ b/Source/WebCore/platform/network/create-http-header-name-table >@@ -29,6 +29,7 @@ > > import os > import sys >+import subprocess > > program_name = os.path.basename(__file__) > if len(sys.argv) < 2: >@@ -240,6 +241,6 @@ header_file.close() > > gperf = os.getenv('GPERF') or sys.argv[2] > >-if os.system('%s --key-positions="*" -D -n -s 2 HTTPHeaderNames.gperf --output-file=HTTPHeaderNames.cpp' % gperf): >+if subprocess.call([gperf, '--key-positions=*', '-D', '-n', '-s', '2', 'HTTPHeaderNames.gperf', '--output-file=HTTPHeaderNames.cpp']) != 0: > sys.stderr.write('Failed to run gperf.') > exit(1)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
darin
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 185291
: 339518