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

dbates at webkit.org dbates at webkit.org
Wed Dec 22 16:07:30 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 6e8f3ab13cabbec3af9c6bc93c284cbc44c13235
Author: dbates at webkit.org <dbates at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Nov 18 20:29:19 2010 +0000

    2010-11-18  Daniel Bates  <dbates at rim.com>
    
            Reviewed by Adam Roben.
    
            update-webkit-support-libs should fall back to existing
            WebKitSupportLibrary version if there is no internet connectivity
            https://bugs.webkit.org/show_bug.cgi?id=49503
    
            Fall back to existing support libraries (if present) when there is
            no internet connection.
    
            Currently, update-webkit-support-libs dies with an "out-of-date"
            error when there is no internet connection because it cannot
            retrieve versioning information from developer.apple.com. Because
            update-webkit-support-libs fails, build-webkit fails. Instead,
            if there is no internet connection and the support libraries are
            present then we should warn the user and exit() with success so
            that build-webkit can work without an internet connection.
    
            * Scripts/update-webkit-support-libs:
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@72326 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index ac7df53..5e4c374 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,24 @@
+2010-11-18  Daniel Bates  <dbates at rim.com>
+
+        Reviewed by Adam Roben.
+
+        update-webkit-support-libs should fall back to existing
+        WebKitSupportLibrary version if there is no internet connectivity
+        https://bugs.webkit.org/show_bug.cgi?id=49503
+
+        Fall back to existing support libraries (if present) when there is
+        no internet connection.
+
+        Currently, update-webkit-support-libs dies with an "out-of-date"
+        error when there is no internet connection because it cannot
+        retrieve versioning information from developer.apple.com. Because
+        update-webkit-support-libs fails, build-webkit fails. Instead,
+        if there is no internet connection and the support libraries are
+        present then we should warn the user and exit() with success so
+        that build-webkit can work without an internet connection.
+
+        * Scripts/update-webkit-support-libs:
+
 2010-11-18  Steve Falkenburg  <sfalken at apple.com>
 
         Reviewed by Adam Roben.
diff --git a/WebKitTools/Scripts/update-webkit-support-libs b/WebKitTools/Scripts/update-webkit-support-libs
index fa2afd0..f0c897e 100755
--- a/WebKitTools/Scripts/update-webkit-support-libs
+++ b/WebKitTools/Scripts/update-webkit-support-libs
@@ -1,6 +1,7 @@
 #!/usr/bin/perl -w
 
 # Copyright (C) 2005, 2006, 2007 Apple Computer, Inc.  All rights reserved.
+# Copyright (C) Research In Motion Limited 2010. All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
 # modification, are permitted provided that the following conditions
@@ -38,6 +39,8 @@ use FindBin;
 use lib $FindBin::Bin;
 use webkitdirs;
 
+use constant NOTAVERSION => "-1";
+
 my $sourceDir = sourceDir();
 my $file = "WebKitSupportLibrary";
 my $zipFile = "$file.zip"; 
@@ -47,23 +50,25 @@ my $webkitLibrariesDir = toUnixPath($ENV{'WEBKITLIBRARIESDIR'}) || "$sourceDir/W
 my $versionFile = $file . "Version";
 my $pathToVersionFile = File::Spec->catfile($webkitLibrariesDir, $versionFile);
 my $tmpDir = File::Spec->rel2abs(File::Temp::tempdir("webkitlibsXXXXXXX", TMPDIR => 1, CLEANUP => 1));
+my $versionFileURL = "http://developer.apple.com/opensource/internet/$versionFile";
 
-chomp(my $expectedVersion = `curl -s http://developer.apple.com/opensource/internet/$versionFile`);
+my $extractedVersion = extractedVersion();
 
 # 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;
-    }
+my $expectedVersion = downloadExpectedVersionNumber();
+if ($extractedVersion ne NOTAVERSION && $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 $zipFileVersion = zipFileVersion();
+dieAndInstructToDownload("$zipFile could not be found in $zipDirectory.") if $zipFileVersion eq NOTAVERSION;
+dieAndInstructToDownload("$zipFile is out-of-date.") if $expectedVersion ne NOTAVERSION && $zipFileVersion ne $expectedVersion;
+if ($zipFileVersion eq $extractedVersion) {
+    print "Falling back to existing version of $file.\n";
+    exit;
+}
 
 my $result = system "unzip", "-q", "-d", $tmpDir, $pathToZip;
 die "Couldn't unzip $zipFile." if $result;
@@ -96,6 +101,29 @@ sub toUnixPath
     return $path;
 }
 
+sub extractedVersion
+{
+    if (open VERSION, "<", $pathToVersionFile) {
+        chomp(my $extractedVersion = <VERSION>);
+        close VERSION;
+        return $extractedVersion;
+    }
+    return NOTAVERSION;
+}
+
+sub downloadExpectedVersionNumber
+{
+    chomp(my $expectedVersion = `curl -s $versionFileURL`);
+    return WEXITSTATUS($?) ? NOTAVERSION : $expectedVersion;
+}
+
+sub zipFileVersion
+{
+    return NOTAVERSION unless -f $pathToZip;
+    chomp(my $zipFileVersion = `unzip -p "$pathToZip" $file/win/$versionFile`);
+    return $zipFileVersion;
+}
+
 sub dieAndInstructToDownload
 {
     my $message = shift;

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list