WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
140278
build-webkit: silence output of 'which'
https://bugs.webkit.org/show_bug.cgi?id=140278
Summary
build-webkit: silence output of 'which'
Michael Catanzaro
Reported
2015-01-08 19:07:31 PST
When webkitdirs.pm runs 'which' it redirects its stdout to /dev/null. At least GNU which prints to stderr when a binary is not found, so we should redirect stderr as well. This fixes an annoying warning that prints at the top of the output of build-webkit on distros that rename ninja to ninja-build.
Attachments
Patch
(1.44 KB, patch)
2015-01-08 19:13 PST
,
Michael Catanzaro
no flags
Details
Formatted Diff
Diff
Patch
(1.90 KB, patch)
2015-01-10 10:06 PST
,
Michael Catanzaro
no flags
Details
Formatted Diff
Diff
Patch
(1.91 KB, patch)
2015-01-10 13:01 PST
,
Michael Catanzaro
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Michael Catanzaro
Comment 1
2015-01-08 19:13:28 PST
Created
attachment 244315
[details]
Patch
Daniel Bates
Comment 2
2015-01-08 20:03:04 PST
Comment on
attachment 244315
[details]
Patch We should take this opportunity to write these functions in terms of webkitdirs::commandExists() instead of duplicating effort. Notice that webkitdirs::commandExists() assumes that a command that exists will emit a non-empty string to stdout when passed --version. We may need to improve the implementation of webkitdirs::commandExists() if it's insufficient to use to test for the existence of ninja, eclipse, and ninja-build.
Michael Catanzaro
Comment 3
2015-01-10 09:43:06 PST
The existing function works fine for ninja, but in the Java tradition, eclipse does not support --version.
Michael Catanzaro
Comment 4
2015-01-10 10:06:36 PST
Created
attachment 244412
[details]
Patch
Michael Catanzaro
Comment 5
2015-01-10 10:07:32 PST
The Windows support is speculative, based on [1] and [2]. I hope that will be tested by the EWS? [1]
http://technet.microsoft.com/en-us/library/cc753148.aspx
[2]
http://support.microsoft.com/kb/110930
Daniel Bates
Comment 6
2015-01-10 11:52:02 PST
Comment on
attachment 244412
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=244412&action=review
> Tools/Scripts/webkitdirs.pm:896 > + return $? == 0;
$? encodes both the exit status and signal code that caused termination of the child process and I'm unclear whether the signal code would be zero under normal circumstances on Windows. Regardless, we should make use of exitStatus() extract the exit status of the child before comparing to 0. Specifically, we should pass the return value of system() to exitStatus().
> Tools/Scripts/webkitdirs.pm:1774 > + return commandExists('ninja') || commandExists('ninja-build');
Nit: ' (single quote) => " (double quote)
> Tools/Scripts/webkitdirs.pm:1779 > + return commandExists('eclipse');
Ditto.
Daniel Bates
Comment 7
2015-01-10 11:57:07 PST
The Windows portion of this patch looks sane to me given the referenced documents in
comment 5
. CC'ed Brent Fulgham who is familiar with the Windows command line environment.
Michael Catanzaro
Comment 8
2015-01-10 13:01:12 PST
Created
attachment 244414
[details]
Patch
WebKit Commit Bot
Comment 9
2015-01-10 15:29:57 PST
Comment on
attachment 244414
[details]
Patch Clearing flags on attachment: 244414 Committed
r178243
: <
http://trac.webkit.org/changeset/178243
>
WebKit Commit Bot
Comment 10
2015-01-10 15:30:00 PST
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug