<?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>32682</bug_id>
          
          <creation_ts>2009-12-17 15:51:57 -0800</creation_ts>
          <short_desc>[Qt] webkitdirs.pm function checkFrameworks always die()s with an error under Windows</short_desc>
          <delta_ts>2009-12-25 15:59:31 -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>Windows XP</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>
          
          <blocked>32683</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Daniel Bates">dbates</reporter>
          <assigned_to name="Daniel Bates">dbates</assigned_to>
          <cc>eric</cc>
    
    <cc>kenneth</cc>
    
    <cc>mrowe</cc>
    
    <cc>webkit.review.bot</cc>
    
    <cc>zoltan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>172974</commentid>
    <comment_count>0</comment_count>
    <who name="Daniel Bates">dbates</who>
    <bug_when>2009-12-17 15:51:57 -0800</bug_when>
    <thetext>The function checkFrameworks always die()s with an error under Windows since the clause &quot;unless (-x $path)&quot; is always satisfied because files under Windows do not have a explict executable bit.

Moreover, the clause and current error message do not match. That is, the framework may exist but may not have its executable bit set. Hence, we should die with an error that explains that the framework was found but its executable bit was not set.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>172979</commentid>
    <comment_count>1</comment_count>
      <attachid>45108</attachid>
    <who name="Daniel Bates">dbates</who>
    <bug_when>2009-12-17 16:07:32 -0800</bug_when>
    <thetext>Created attachment 45108
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>172981</commentid>
    <comment_count>2</comment_count>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2009-12-17 16:09:43 -0800</bug_when>
    <thetext>style-queue ran check-webkit-style on attachment 45108 without any errors.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>173882</commentid>
    <comment_count>3</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2009-12-20 23:04:15 -0800</bug_when>
    <thetext>I&apos;m confused.  How are scripts which use this function working today?  Or is it only when using WindowsPerl instead of CygWinPerl that this fails?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>174625</commentid>
    <comment_count>4</comment_count>
    <who name="Daniel Bates">dbates</who>
    <bug_when>2009-12-23 12:14:11 -0800</bug_when>
    <thetext>(In reply to comment #3)
&gt; I&apos;m confused.  How are scripts which use this function working today?  Or is it
&gt; only when using WindowsPerl instead of CygWinPerl that this fails?

This issue arises when you are not using Cygwin, say you are using the Qt Command Prompt.

(*)Testing with -x in Perl under Windows always returns false because Windows does not share the same concept of the executable bit as Unix/Linux. Moreover, we never reach line 573 of webkitdirs.pm &lt;http://trac.webkit.org/browser/trunk/WebKitTools/Scripts/webkitdirs.pm?rev=52522#L573&gt; (whose unless condition would always fail and cause us to die() by (*)) when we are using Cygwin because of line 568 &lt;http://trac.webkit.org/browser/trunk/WebKitTools/Scripts/webkitdirs.pm?rev=52522#L568&gt;, which causes us to return immediately. However, when you are not using Cygwin (say you&apos;re using the Qt Command Prompt), then we will reach line 573 and die() because of (*).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>174797</commentid>
    <comment_count>5</comment_count>
      <attachid>45108</attachid>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2009-12-24 11:52:17 -0800</bug_when>
    <thetext>Comment on attachment 45108
Patch

I think the code should have a comment about why we have this.  At some level the separate -x check isn&apos;t even really necessary.  The -e check is most important.  If somehow someone has their permissions wrong, I&apos;m not sure we need to catch that here.

I&apos;d just remove the -x check.  Or if you decide to keep it, please add a comment about why it&apos;s separate from the -e check.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>174801</commentid>
    <comment_count>6</comment_count>
    <who name="Daniel Bates">dbates</who>
    <bug_when>2009-12-24 12:03:14 -0800</bug_when>
    <thetext>I&apos;ll remove the -x check when I land this.

(In reply to comment #5)
&gt; (From update of attachment 45108 [details])
&gt; I think the code should have a comment about why we have this.  At some level
&gt; the separate -x check isn&apos;t even really necessary.  The -e check is most
&gt; important.  If somehow someone has their permissions wrong, I&apos;m not sure we
&gt; need to catch that here.
&gt; 
&gt; I&apos;d just remove the -x check.  Or if you decide to keep it, please add a
&gt; comment about why it&apos;s separate from the -e check.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>174907</commentid>
    <comment_count>7</comment_count>
    <who name="Daniel Bates">dbates</who>
    <bug_when>2009-12-25 15:59:31 -0800</bug_when>
    <thetext>Committed in &lt;http://trac.webkit.org/changeset/52562&gt;.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>45108</attachid>
            <date>2009-12-17 16:07:32 -0800</date>
            <delta_ts>2009-12-24 11:52:17 -0800</delta_ts>
            <desc>Patch</desc>
            <filename>Bug32682.patch</filename>
            <type>text/plain</type>
            <size>1394</size>
            <attacher name="Daniel Bates">dbates</attacher>
            
              <data encoding="base64">SW5kZXg6IFdlYktpdFRvb2xzL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBXZWJLaXRUb29scy9D
aGFuZ2VMb2cJKHJldmlzaW9uIDUyMjkzKQorKysgV2ViS2l0VG9vbHMv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mtzLCAiV2ViS2l0IikgaWYgaXNBcHBsZU1hY1dlYktpdCgpOwogICAgIGZvciBteSAkZnJh
bWV3b3JrIChAZnJhbWV3b3JrcykgewogICAgICAgICBteSAkcGF0aCA9IGJ1aWx0RHlsaWJQYXRo
Rm9yTmFtZSgkZnJhbWV3b3JrKTsKLSAgICAgICAgZGllICJDYW4ndCBmaW5kIGJ1aWx0IGZyYW1l
d29yayBhdCBcIiRwYXRoXCIuXG4iIHVubGVzcyAteCAkcGF0aDsKKyAgICAgICAgZGllICJDYW4n
dCBmaW5kIGJ1aWx0IGZyYW1ld29yayBhdCBcIiRwYXRoXCIuXG4iIHVubGVzcyAtZSAkcGF0aDsK
KyAgICAgICAgZGllICJUaGUgZnJhbWV3b3JrIFwiJHBhdGhcIiBpcyBub3QgZXhlY3V0YWJsZS5c
bllvdSBtdXN0IHNldCBpdHMgZXhlY3V0YWJsZSBiaXQuXG4iIHVubGVzcyAoaXNXaW5kb3dzKCkg
fHwgLXggJHBhdGgpOwogICAgIH0KIH0KIAo=
</data>
<flag name="review"
          id="27090"
          type_id="1"
          status="+"
          setter="eric"
    />
          </attachment>
      

    </bug>

</bugzilla>