Changeset 29127 in webkit


Ignore:
Timestamp:
Jan 3, 2008 10:19:15 AM (16 years ago)
Author:
Adam Roben
Message:

Fix Bug 15663: update-webkit re-downloads WebKitAuxiliaryLibrary unnecessarily

http://bugs.webkit.org/show_bug.cgi?id=15663

Added a fuzz factor into the Last-Modified comparison for downloading
WebKitAuxiliaryLibrary.zip.

The zip file is served from a set of mirrors who give Last-Modified
times that are off by 1-3 seconds from each other. This was causing
the build bots to redownload WebKitAuxiliaryLibrary for every build,
which would then cause all of WebCore to rebuild each time.

Reviewed by Mark.

  • Scripts/update-webkit-auxiliary-libs: Check if the new zip file is at least 30 seconds newer than the old one -- otherwise we assume that the difference in time is due to the mirrors being slightly offset from each other. (sub lastModifiedToUnixTime): Added.
Location:
trunk/WebKitTools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKitTools/ChangeLog

    r29124 r29127  
     12008-01-03  Adam Roben  <aroben@apple.com>
     2
     3        Fix Bug 15663: update-webkit re-downloads WebKitAuxiliaryLibrary unnecessarily
     4
     5        http://bugs.webkit.org/show_bug.cgi?id=15663
     6
     7        Added a fuzz factor into the Last-Modified comparison for downloading
     8        WebKitAuxiliaryLibrary.zip.
     9
     10        The zip file is served from a set of mirrors who give Last-Modified
     11        times that are off by 1-3 seconds from each other. This was causing
     12        the build bots to redownload WebKitAuxiliaryLibrary for every build,
     13        which would then cause all of WebCore to rebuild each time.
     14
     15        Reviewed by Mark.
     16
     17        * Scripts/update-webkit-auxiliary-libs: Check if the new zip file is
     18        at least 30 seconds newer than the old one -- otherwise we assume that
     19        the difference in time is due to the mirrors being slightly offset
     20        from each other.
     21        (sub lastModifiedToUnixTime): Added.
     22
    1232008-01-03  Alexey Proskuryakov  <ap@webkit.org>
    224
  • trunk/WebKitTools/Scripts/update-webkit-auxiliary-libs

    r25725 r29127  
    3232use warnings;
    3333
     34use Date::Parse qw(str2time);
    3435use File::Find;
    3536use File::Temp;
     
    3839use lib $FindBin::Bin;
    3940use webkitdirs;
     41
     42sub lastModifiedToUnixTime($);
     43
     44# Time in seconds that the new zip file must be newer than the old for us to
     45# consider them to be different. If the difference in modification time is less
     46# than this threshold, we assume that the files are the same. We need this
     47# because the zip file is served from a set of mirrors with slightly different
     48# Last-Modified times.
     49my $newnessThreshold = 30;
    4050
    4151my $sourceDir = sourceDir();
     
    5262
    5363if (!$result && open NEW, "$tmpDir/$file.headers") {
    54     my $new = <NEW>;
     64    my $new = lastModifiedToUnixTime(<NEW>);
    5565    close NEW;
    5666
    57     if (open OLD, "$webkitLibrariesDir/$file.headers") {
    58         my $old = <OLD>;
     67    if (defined $new && open OLD, "$webkitLibrariesDir/$file.headers") {
     68        my $old = lastModifiedToUnixTime(<OLD>);
    5969        close OLD;
    60         if ($old eq $new) {
     70        if (defined $old && abs($new - $old) < $newnessThreshold) {
    6171            print "Current $file is up to date\n";
    6272            exit 0;
     
    102112    return $path;
    103113}
     114
     115sub lastModifiedToUnixTime($)
     116{
     117    my ($str) = @_;
     118
     119    $str =~ /^Last-Modified: (.*)$/ or return;
     120    return str2time($1);
     121}
Note: See TracChangeset for help on using the changeset viewer.