<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Improve update-webkit-dependency script"
   href="https://bugs.webkit.org/show_bug.cgi?id=155576">155576</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Improve update-webkit-dependency script
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>WebKit
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>WebKit Local Build
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Windows 10
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>Normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P2
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Tools / Tests
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>webkit-unassigned&#64;lists.webkit.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>WebKit&#64;JeremyZerfas.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>lforschler&#64;apple.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>The update-webkit-dependency script could use several improvements.

First, every time it is ran it tries to download the entire dependency just in order to get the Last-Modified header so that it can check to see if the dependency is up to date. This could be improved by instead doing a request for just the first byte of the dependency if the server supports range requests and also setting a size limit for the request so the entire dependency is not downloaded in order to get the headers. This can save a decent amount of time and bandwidth for people.

Second, it tries to use the Last-Modified header to determine whether the dependency is up to date and if the server doesn't emit Last-Modified headers (like Dropbox's server which is currently used to store the WinCairoRequirements.zip file and also GitHub as well) it then tries to get the Last-Modified header from a separate *.headers file that is also placed on the server. This could be improved by also using ETag headers (which Dropbox and GitHub both support) to see if the dependency is up to date. When using Dropbox this would generally eliminate the need to maintain those separate *.headers file which seems to cause problems from time to time (see <a href="https://lists.webkit.org/pipermail/webkit-help/2015-November/003987.html">https://lists.webkit.org/pipermail/webkit-help/2015-November/003987.html</a> and <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Fix the clean build on the WinCairo buildbot"
   href="show_bug.cgi?id=153876">bug 153876</a>).

Third, it would also be nice if before installing a dependency, it first checked the zip file to make sure it contains the expected directories. This would help in preventing problems like those in <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Fix the clean build on the WinCairo buildbot"
   href="show_bug.cgi?id=153876">bug 153876</a>.

The patch that I'll be attaching in a moment makes these improvements to the script plus makes a few other minor improvements (more error checking and better error messages mainly).</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>