<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>33365</bug_id>
          
          <creation_ts>2010-01-07 22:29:03 -0800</creation_ts>
          <short_desc>webkit-patch&apos;s use of auto-install is dropping autoinstall directories everywhere</short_desc>
          <delta_ts>2010-01-26 19:59:21 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Tools / Tests</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>OS X 10.5</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Eric Seidel (no email)">eric</reporter>
          <assigned_to name="Chris Jerdonek">cjerdonek</assigned_to>
          <cc>abarth</cc>
    
    <cc>cjerdonek</cc>
    
    <cc>tony</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>178531</commentid>
    <comment_count>0</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2010-01-07 22:29:03 -0800</bug_when>
    <thetext>webkit-patch&apos;s use of auto-install is dropping autoinstall directories everywhere

We need to teach autoinstall to not use the CWD.  Right now depending on where you run the command from, it will drop a new autoinstall direcotry there.  That&apos;s bad.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>184622</commentid>
    <comment_count>1</comment_count>
    <who name="Chris Jerdonek">cjerdonek</who>
    <bug_when>2010-01-26 10:10:57 -0800</bug_when>
    <thetext>This has been annoying to me, too.  I&apos;ll change it so that the autoinstall cache directory is put in the same directory as autoinstall.

I also think the cache directory should give some indication of where it came from.  The first time I saw them, I had no way to know what they were or where they were coming from.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>184662</commentid>
    <comment_count>2</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2010-01-26 12:06:21 -0800</bug_when>
    <thetext>Mostly I&apos;ve been afraid of python&apos;s &quot;logging&quot; module.  I need to learn it. :(

I suspect this fix is a one-lnine change to webkitpy/__init__.py (the one place we use autoinstall.py).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>184723</commentid>
    <comment_count>3</comment_count>
      <attachid>47447</attachid>
    <who name="Chris Jerdonek">cjerdonek</who>
    <bug_when>2010-01-26 14:12:56 -0800</bug_when>
    <thetext>Created attachment 47447
Proposed patch

The cache directory gets created when &quot;import&quot; is called for an external module (when searching for the module to import), rather than when autoinstall.py is first processed.

Other possibilities would be to change the working directory prior to calling &quot;import&quot; for an external module, or to trigger the cache directory to get created while still inside __init__.py, but this seems most straightforward.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>184734</commentid>
    <comment_count>4</comment_count>
      <attachid>47447</attachid>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2010-01-26 14:22:38 -0800</bug_when>
    <thetext>Comment on attachment 47447
Proposed patch

LGTM.  Thanks for taking care of this.  Eventually we might upstream this change http://code.google.com/p/pyautoinstall/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>184895</commentid>
    <comment_count>5</comment_count>
      <attachid>47447</attachid>
    <who name="Chris Jerdonek">cjerdonek</who>
    <bug_when>2010-01-26 19:02:21 -0800</bug_when>
    <thetext>Comment on attachment 47447
Proposed patch

cq- to use webkit-patch.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>184897</commentid>
    <comment_count>6</comment_count>
      <attachid>47447</attachid>
    <who name="Chris Jerdonek">cjerdonek</who>
    <bug_when>2010-01-26 19:05:09 -0800</bug_when>
    <thetext>Comment on attachment 47447
Proposed patch

Clearing flags on attachment: 47447

Committed r53887: &lt;http://trac.webkit.org/changeset/53887&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>184898</commentid>
    <comment_count>7</comment_count>
    <who name="Chris Jerdonek">cjerdonek</who>
    <bug_when>2010-01-26 19:05:16 -0800</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>184900</commentid>
    <comment_count>8</comment_count>
    <who name="Tony Chang">tony</who>
    <bug_when>2010-01-26 19:31:42 -0800</bug_when>
    <thetext>This seems to have broken webkit-patch for me.  The error is:

Failed to run &quot;[&apos;WebKitTools/Scripts/test-webkitpy&apos;]&quot; exit_code: 1
Last 500 characters of output:
.py:201: Warning: &apos;with&apos; will become a reserved keyword in Python 2.6
Traceback (most recent call last):
  File &quot;WebKitTools/Scripts/test-webkitpy&quot;, line 33, in &lt;module&gt;
    from webkitpy.bugzilla_unittest import *
  File &quot;/Users/tc/webkit/WebKit/WebKitTools/Scripts/webkitpy/__init__.py&quot;, line 3, in &lt;module&gt;
    import autoinstall
  File &quot;/Users/tc/webkit/WebKit/WebKitTools/Scripts/webkitpy/autoinstall.py&quot;, line 201
    with open(readme_path, &quot;w&quot;) as f:
            ^
SyntaxError: invalid syntax

Failed to run &quot;[&apos;WebKitTools/Scripts/test-webkitpy&apos;]&quot; exit_code: 1</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>184901</commentid>
    <comment_count>9</comment_count>
    <who name="Tony Chang">tony</who>
    <bug_when>2010-01-26 19:33:09 -0800</bug_when>
    <thetext>(In reply to comment #8)
&gt; This seems to have broken webkit-patch for me.  The error is:

This is from me running webkit-patch land-from-bug.  It compiles fine, but seems to crash after it gets to &quot;Running Python unit tests&quot;.  From further up the stack:

===========================================================
 WebKit is now built (00m:27s). 
 To run Safari with this newly-built code, use the
 &quot;WebKitTools/Scripts/run-safari&quot; script.
===========================================================
Running Python unit tests
/Users/tc/webkit/WebKit/WebKitTools/Scripts/webkitpy/autoinstall.py:201: Warning: &apos;with&apos; will become a reserved keyword in Python 2.6
Traceback (most recent call last):
  File &quot;WebKitTools/Scripts/test-webkitpy&quot;, line 33, in &lt;module&gt;
    from webkitpy.bugzilla_unittest import *
  File &quot;/Users/tc/webkit/WebKit/WebKitTools/Scripts/webkitpy/__init__.py&quot;, line 3, in &lt;module&gt;
    import autoinstall
  File &quot;/Users/tc/webkit/WebKit/WebKitTools/Scripts/webkitpy/autoinstall.py&quot;, line 201
    with open(readme_path, &quot;w&quot;) as f:
            ^
SyntaxError: invalid syntax</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>184903</commentid>
    <comment_count>10</comment_count>
    <who name="Chris Jerdonek">cjerdonek</who>
    <bug_when>2010-01-26 19:41:12 -0800</bug_when>
    <thetext>(In reply to comment #9)
==========
&gt; Running Python unit tests
&gt; /Users/tc/webkit/WebKit/WebKitTools/Scripts/webkitpy/autoinstall.py:201:
&gt; Warning: &apos;with&apos; will become a reserved keyword in Python 2.6
&gt; Traceback (most recent call last):
&gt;   File &quot;WebKitTools/Scripts/test-webkitpy&quot;, line 33, in &lt;module&gt;
&gt;     from webkitpy.bugzilla_unittest import *
&gt;   File &quot;/Users/tc/webkit/WebKit/WebKitTools/Scripts/webkitpy/__init__.py&quot;, line
&gt; 3, in &lt;module&gt;
&gt;     import autoinstall
&gt;   File &quot;/Users/tc/webkit/WebKit/WebKitTools/Scripts/webkitpy/autoinstall.py&quot;,
&gt; line 201
&gt;     with open(readme_path, &quot;w&quot;) as f:
&gt;             ^
&gt; SyntaxError: invalid syntax

It looks like this requires an extra line of code for Python 2.5 users:

http://docs.python.org/whatsnew/2.6.html#pep-343-the-with-statement

from __future__ import with_statement

What version of Python are you using?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>184904</commentid>
    <comment_count>11</comment_count>
    <who name="Tony Chang">tony</who>
    <bug_when>2010-01-26 19:43:01 -0800</bug_when>
    <thetext>(In reply to comment #10)
&gt; It looks like this requires an extra line of code for Python 2.5 users:
&gt; 
&gt; http://docs.python.org/whatsnew/2.6.html#pep-343-the-with-statement
&gt; 
&gt; from __future__ import with_statement
&gt; 
&gt; What version of Python are you using?

pthon2.5.1, the default version on my mac (leopard).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>184905</commentid>
    <comment_count>12</comment_count>
    <who name="Chris Jerdonek">cjerdonek</who>
    <bug_when>2010-01-26 19:49:15 -0800</bug_when>
    <thetext>(In reply to comment #11)
&gt; (In reply to comment #10)
&gt; &gt; It looks like this requires an extra line of code for Python 2.5 users:
&gt; &gt; 
&gt; &gt; http://docs.python.org/whatsnew/2.6.html#pep-343-the-with-statement
&gt; &gt; 
&gt; &gt; from __future__ import with_statement
&gt; &gt; 
&gt; &gt; What version of Python are you using?
&gt; 
&gt; pthon2.5.1, the default version on my mac (leopard).

I can try fixing this by adding this line to the top of WebKitTools/Scripts/webkitpy/autoinstall.py:

from __future__ import with_statement

Tony, would you be able to try adding this on your machine to see if it resolves the issue? I don&apos;t have Python 2.5 installed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>184906</commentid>
    <comment_count>13</comment_count>
    <who name="Tony Chang">tony</who>
    <bug_when>2010-01-26 19:50:55 -0800</bug_when>
    <thetext>(In reply to comment #12)
&gt; I can try fixing this by adding this line to the top of
&gt; WebKitTools/Scripts/webkitpy/autoinstall.py:
&gt; 
&gt; from __future__ import with_statement
&gt; 
&gt; Tony, would you be able to try adding this on your machine to see if it
&gt; resolves the issue? I don&apos;t have Python 2.5 installed.

That works for me (adding it above the __version__ line).  Or you could rewrite the code to not use &quot;with&quot;.  :)  It&apos;s not a lot of code either way.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>184907</commentid>
    <comment_count>14</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2010-01-26 19:51:14 -0800</bug_when>
    <thetext>This broek the commit-queue too. r olling out.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>184908</commentid>
    <comment_count>15</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2010-01-26 19:51:46 -0800</bug_when>
    <thetext>hmm...  looks liek chris is on it...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>184909</commentid>
    <comment_count>16</comment_count>
    <who name="Chris Jerdonek">cjerdonek</who>
    <bug_when>2010-01-26 19:59:21 -0800</bug_when>
    <thetext>Attempted fix r53888:

http://trac.webkit.org/changeset/53888</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>47447</attachid>
            <date>2010-01-26 14:12:56 -0800</date>
            <delta_ts>2010-01-26 19:05:09 -0800</delta_ts>
            <desc>Proposed patch</desc>
            <filename>_patch-33365-1.txt</filename>
            <type>text/plain</type>
            <size>2368</size>
            <attacher name="Chris Jerdonek">cjerdonek</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL1dlYktpdFRvb2xzL0NoYW5nZUxvZyBiL1dlYktpdFRvb2xzL0NoYW5nZUxv
ZwppbmRleCA0NDI3YTlkLi4xZDI4MmVkIDEwMDY0NAotLS0gYS9XZWJLaXRUb29scy9DaGFuZ2VM
b2cKKysrIGIvV2ViS2l0VG9vbHMvQ2hhbmdlTG9nCkBAIC0xLDMgKzEsMTYgQEAKKzIwMTAtMDEt
MjYgIENocmlzIEplcmRvbmVrICA8Y2plcmRvbmVrQHdlYmtpdC5vcmc+CisKKyAgICAgICAgUmV2
aWV3ZWQgYnkgTk9CT0RZIChPT1BTISkuCisKKyAgICAgICAgVGhlIFB5dGhvbiBhdXRvaW5zdGFs
bCBjYWNoZSBkaXJlY3Rvcnkgbm93IG9ubHkgZ2V0cyBjcmVhdGVkCisgICAgICAgIGluIHRoZSBk
aXJlY3RvcnkgY29udGFpbmluZyBhdXRvaW5zdGFsbC5weS4KKworICAgICAgICBodHRwczovL2J1
Z3Mud2Via2l0Lm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yeSkKKyAgICAgICAgcmVhZG1lX3BhdGggPSBvcy5wYXRoLmpvaW4oc2Vs
Zi5kaXJlY3RvcnksICJSRUFETUUiKQorICAgICAgICB3aXRoIG9wZW4ocmVhZG1lX3BhdGgsICJ3
IikgYXMgZjoKKyAgICAgICAgICAgIGYud3JpdGUoIlRoaXMgZGlyZWN0b3J5IHdhcyBhdXRvLWdl
bmVyYXRlZCBieSAnJXMnLlxuIgorICAgICAgICAgICAgICAgICAgICAiSXQgaXMgc2FmZSB0byBk
ZWxldGUuXG4iICUgX19maWxlX18pCisKICAgICBkZWYgZ2V0KHNlbGYsIHVybCk6CiAgICAgICAg
IF9sb2dnZXIuaW5mbygiR2V0dGluZyAnJXMnIGZyb20gY2FjaGUuIiAlIHVybCkKICAgICAgICAg
ZmlsZW5hbWUgPSB1cmwucnNwbGl0KCIvIilbLTFdCg==
</data>

          </attachment>
      

    </bug>

</bugzilla>