Bug 28225

Summary: check-webkit-style uses python from /usr/bin instead of the PATH
Product: WebKit Reporter: Carol Szabo <carol>
Component: Tools / TestsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: ddkilzer, eric, laszlo.gombos
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Linux   
Attachments:
Description Flags
Patch: uses python from $PATH
eric: review-
This is the second patch attempt for this problem none

Carol Szabo
Reported 2009-08-12 13:07:38 PDT
check-webkit-style starts with '#!/usr/bin/python'. This prevents usage of the script on computers where /usr/bin/python is absent or is too old even if an appropriate python version exists in the PATH.
Attachments
Patch: uses python from $PATH (999 bytes, patch)
2009-08-12 13:34 PDT, Carol Szabo
eric: review-
This is the second patch attempt for this problem (2.51 KB, patch)
2009-08-31 13:28 PDT, Carol Szabo
no flags
Carol Szabo
Comment 1 2009-08-12 13:34:50 PDT
Created attachment 34686 [details] Patch: uses python from $PATH This solution was suggested by kollivier on the #webkit IRC channel. It worked for me and it may be useful to others.
Mark Rowe (bdash)
Comment 2 2009-08-12 13:58:21 PDT
None of our existing scripts in WebKitTools/Scripts use this approach. If this is a problem I don't see why we would only fix a single script.
Mark Rowe (bdash)
Comment 3 2009-08-12 13:58:52 PDT
Comment on attachment 34686 [details] Patch: uses python from $PATH Clearing review flag for reason mentioned.
Carol Szabo
Comment 4 2009-08-12 14:13:48 PDT
(In reply to comment #2) > None of our existing scripts in WebKitTools/Scripts use this approach. If this > is a problem I don't see why we would only fix a single script. Mark, You are right that this would fix only one script and if otherwise the fix is acceptable I am willing to change all scripts in the directory to use the same approach. On the other hand, there is one other script (roll-over-ChangeLogs) which uses the same approach, so it can be argued that since it is ok for that script it should be ok for this script too. I believe that the /usr/bin/env approach does not make sense for standard shells (such as /usr/bin/sh), but may be useful for perl, python and ruby scripts where many incompatible versions may exist in the system.
Laszlo Gombos
Comment 5 2009-08-24 14:10:46 PDT
(In reply to comment #4) > (In reply to comment #2) > > None of our existing scripts in WebKitTools/Scripts use this approach. If this > > is a problem I don't see why we would only fix a single script. > > Mark, > You are right that this would fix only one script and if otherwise the fix is > acceptable I am willing to change all scripts in the directory to use the same > approach. > > On the other hand, there is one other script (roll-over-ChangeLogs) which uses > the same approach, so it can be argued that since it is ok for that script it > should be ok for this script too. > > I believe that the /usr/bin/env approach does not make sense for standard > shells (such as /usr/bin/sh), but may be useful for perl, python and ruby > scripts where many incompatible versions may exist in the system. Perhaps -for now - we should just do this for "top level" python scripts. I did a quick search and I only found 3 scripts: check-webkit-style, bugzilla-tool, run-webkit-unittests
Eric Seidel (no email)
Comment 6 2009-08-25 10:35:25 PDT
Comment on attachment 34686 [details] Patch: uses python from $PATH Marking r- per the discussion above. Either we should do this for all scripts or none.
Carol Szabo
Comment 7 2009-08-31 13:28:23 PDT
Created attachment 38831 [details] This is the second patch attempt for this problem I have applied the fix to all python scripts per lgombos's comments. I was reluctant to fix all scripts in the directory as I am not familiar with many of them and I think that it is preferable that (as the case of style errors in C/C++ code) they are fixed as they cause problems. I am not quite an "if its not broken don't fix it" kind of guy, but I am reluctant to take poorly understood (at least by me) risks when the benefit is small.
Eric Seidel (no email)
Comment 8 2009-09-01 11:09:39 PDT
Comment on attachment 38831 [details] This is the second patch attempt for this problem Rejecting patch 38831 from commit-queue. This patch will require manual commit. Failed to run "/Users/eseidel/Projects/WebKitSVN/WebKitTools/Scripts/update-webkit" exit_code: 1 cwd: None
Eric Seidel (no email)
Comment 9 2009-09-01 16:38:14 PDT
Comment on attachment 38831 [details] This is the second patch attempt for this problem svn: Failed to add file 'WebCore/bindings/v8/custom/V8WebSocketCustom.cpp': object of the same name already exists This was a victim of bug 28603. :(
Eric Seidel (no email)
Comment 10 2009-09-01 17:42:02 PDT
Comment on attachment 38831 [details] This is the second patch attempt for this problem Rejecting patch 38831 from commit-queue. This patch will require manual commit. ['WebKitTools/Scripts/run-webkit-tests', '--no-launch-safari', '--quiet', '--exit-after-n-failures=1'] failed with exit code 1
Eric Seidel (no email)
Comment 11 2009-09-02 00:45:03 PDT
Comment on attachment 38831 [details] This is the second patch attempt for this problem Flakey test. :( compositing/color-matching/image-color-matching.html -> crashed
Eric Seidel (no email)
Comment 12 2009-09-02 00:49:10 PDT
I believe that's just another instance of bug 28845 biting us. :(
Eric Seidel (no email)
Comment 13 2009-09-02 01:01:30 PDT
Comment on attachment 38831 [details] This is the second patch attempt for this problem Clearing flags on attachment: 38831 Committed r47955: <http://trac.webkit.org/changeset/47955>
Eric Seidel (no email)
Comment 14 2009-09-02 01:01:34 PDT
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.