[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

aroben at apple.com aroben at apple.com
Wed Dec 22 14:47:11 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit a79dc0b8a94ff7c707a607d34a6acf380cf145fb
Author: aroben at apple.com <aroben at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Oct 20 06:33:27 2010 +0000

    Teach update-webkit-support-libs about the new versioning of WebKitSupportLibrary
    
    Fixes <http://webkit.org/b/47915> update-webkit-support-libs should
    check version numbers instead of modification times
    
    Reviewed by Sam Weinig.
    
    * Scripts/update-webkit-support-libs: Fetch the expected version
    number from developer.apple.com, then compare with the version number
    of the extracted library and of the zipped library to see if anything
    needs to be done. Removed code that tracked the modified timestamp of
    the library, as it is no longer needed.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@70128 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index bdff774..b128dfb 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,19 @@
+2010-10-19  Adam Roben  <aroben at apple.com>
+
+        Teach update-webkit-support-libs about the new versioning of
+        WebKitSupportLibrary
+
+        Fixes <http://webkit.org/b/47915> update-webkit-support-libs should
+        check version numbers instead of modification times
+
+        Reviewed by Sam Weinig.
+
+        * Scripts/update-webkit-support-libs: Fetch the expected version
+        number from developer.apple.com, then compare with the version number
+        of the extracted library and of the zipped library to see if anything
+        needs to be done. Removed code that tracked the modified timestamp of
+        the library, as it is no longer needed.
+
 2010-10-19  Eric Seidel  <eric at webkit.org>
 
         Reviewed by Adam Barth.
diff --git a/WebKitTools/Scripts/update-webkit-support-libs b/WebKitTools/Scripts/update-webkit-support-libs
index 7065293..fa2afd0 100755
--- a/WebKitTools/Scripts/update-webkit-support-libs
+++ b/WebKitTools/Scripts/update-webkit-support-libs
@@ -38,43 +38,33 @@ use FindBin;
 use lib $FindBin::Bin;
 use webkitdirs;
 
-my $expectedMD5 = "a1341aadbcce1ef26dad2b2895457314";
-
 my $sourceDir = sourceDir();
 my $file = "WebKitSupportLibrary";
 my $zipFile = "$file.zip"; 
 my $zipDirectory = toUnixPath($ENV{'WEBKITSUPPORTLIBRARIESZIPDIR'}) || $sourceDir;
 my $pathToZip = File::Spec->catfile($zipDirectory, $zipFile);
 my $webkitLibrariesDir = toUnixPath($ENV{'WEBKITLIBRARIESDIR'}) || "$sourceDir/WebKitLibraries/win";
+my $versionFile = $file . "Version";
+my $pathToVersionFile = File::Spec->catfile($webkitLibrariesDir, $versionFile);
 my $tmpDir = File::Spec->rel2abs(File::Temp::tempdir("webkitlibsXXXXXXX", TMPDIR => 1, CLEANUP => 1));
 
-# Make sure the file zipfile exists and matches the expected MD5 before doing anything.
-
--f $pathToZip or dieAndInstructToDownload("$zipFile could not be find in your root source directory.");
-
-`md5sum "$pathToZip"` =~ /^([0-9a-fA-F]{32}).*/ or die "Error running md5sum on \"$pathToZip\"";
-my $actualMD5 = $1;
-$actualMD5 eq $expectedMD5 or dieAndInstructToDownload("$zipFile is out of date.");
-
-print "Checking mod-date of $zipFile...\n";
-open MOD, ">$tmpDir/$file.modified" or die "Couldn't open $tmpDir/$file.modified for writing";
-print MOD (stat $pathToZip)[9] . "\n";
-close MOD;
+chomp(my $expectedVersion = `curl -s http://developer.apple.com/opensource/internet/$versionFile`);
 
-if (open NEW, "$tmpDir/$file.modified") {
-    my $new = <NEW>;
-    close NEW;
-
-    if (open OLD, "$webkitLibrariesDir/$file.modified") {
-        my $old = <OLD>;
-        close OLD;
-        if ($old eq $new) {
-            print "Current $file is up to date\n";
-            exit 0;
-        }
+# Check whether the extracted library is up-to-date. If it is, we don't have anything to do.
+if (open VERSION, "<", $pathToVersionFile) {
+    chomp(my $extractedVersion = <VERSION>);
+    close VERSION;
+    if ($extractedVersion eq $expectedVersion) {
+        print "$file is up-to-date.\n";
+        exit;
     }
 }
 
+# Check whether the downloaded library is up-to-date. If it isn't, the user needs to download it.
+-f $pathToZip or dieAndInstructToDownload("$zipFile could not be found in $zipDirectory.");
+chomp(my $zipFileVersion = `unzip -p "$pathToZip" $file/win/$versionFile`);
+dieAndInstructToDownload("$zipFile is out-of-date.") if $zipFileVersion ne $expectedVersion;
+
 my $result = system "unzip", "-q", "-d", $tmpDir, $pathToZip;
 die "Couldn't unzip $zipFile." if $result;
 
@@ -95,9 +85,6 @@ sub wanted
 
 File::Find::find(\&wanted, "$tmpDir/$file");
 
-$result = system "mv", "$tmpDir/$file.modified", $webkitLibrariesDir;
-print STDERR "Couldn't move $file.modified to $webkitLibrariesDir" . ".\n" if $result;
-
 print "The $file has been sucessfully installed in\n $webkitLibrariesDir\n";
 exit;
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list