[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

ossy at webkit.org ossy at webkit.org
Wed Apr 7 23:06:17 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit e3a97d7e7f5497c69fc2ae355bc56130646d1fe0
Author: ossy at webkit.org <ossy at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Oct 26 18:57:21 2009 +0000

    Unification of using null device in perl scripts.
    https://bugs.webkit.org/show_bug.cgi?id=30572
    
    Patch by Csaba Osztrogonác <ossy at webkit.org> on 2009-10-26
    Reviewed by Darin Adler.
    
    * Scripts/VCSUtils.pm:
    * Scripts/bisect-builds:
    * Scripts/resolve-ChangeLogs:
    * Scripts/run-iexploder-tests:
    * Scripts/run-jsc:
    * Scripts/run-mangleme-tests:
    * Scripts/run-webkit-tests:
    * Scripts/webkitdirs.pm:
    Using File::Spec->devnull() instead of hard coded /dev/null.
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@50080 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 9eb8093..846ba49 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,20 @@
+2009-10-26  Csaba Osztrogonác  <ossy at webkit.org>
+
+        Reviewed by Darin Adler.
+
+        Unification of using null device in perl scripts.
+        https://bugs.webkit.org/show_bug.cgi?id=30572
+
+        * Scripts/VCSUtils.pm:
+        * Scripts/bisect-builds:
+        * Scripts/resolve-ChangeLogs:
+        * Scripts/run-iexploder-tests:
+        * Scripts/run-jsc:
+        * Scripts/run-mangleme-tests:
+        * Scripts/run-webkit-tests:
+        * Scripts/webkitdirs.pm:
+        Using File::Spec->devnull() instead of hard coded /dev/null.
+
 2009-10-26  Eric Seidel  <eric at webkit.org>
 
         Reviewed by Holger Freyther.
diff --git a/WebKitTools/Scripts/VCSUtils.pm b/WebKitTools/Scripts/VCSUtils.pm
index 6ec12c9..306cdd6 100644
--- a/WebKitTools/Scripts/VCSUtils.pm
+++ b/WebKitTools/Scripts/VCSUtils.pm
@@ -70,7 +70,7 @@ my $svnVersion;
 sub isGitDirectory($)
 {
     my ($dir) = @_;
-    return system("cd $dir && git rev-parse > /dev/null 2>&1") == 0;
+    return system("cd $dir && git rev-parse > " . File::Spec->devnull() . " 2>&1") == 0;
 }
 
 sub isGit()
@@ -159,7 +159,6 @@ sub determineGitRoot()
 
 sub determineSVNRoot()
 {
-    my $devNull = File::Spec->devnull();
     my $last = '';
     my $path = '.';
     my $parent = '..';
@@ -169,7 +168,7 @@ sub determineSVNRoot()
         my $thisRoot;
         my $thisUUID;
         # Ignore error messages in case we've run past the root of the checkout.
-        open INFO, "svn info '$path' 2> $devNull |" or die;
+        open INFO, "svn info '$path' 2> " . File::Spec->devnull() . " |" or die;
         while (<INFO>) {
             if (/^Repository Root: (.+)/) {
                 $thisRoot = $1;
diff --git a/WebKitTools/Scripts/bisect-builds b/WebKitTools/Scripts/bisect-builds
index 93e9223..55bf238 100755
--- a/WebKitTools/Scripts/bisect-builds
+++ b/WebKitTools/Scripts/bisect-builds
@@ -368,7 +368,7 @@ sub mountAndRunNightly($$$$)
     while (-e $mountPath) {
         $i++;
         usleep 100 if $i > 1;
-        `hdiutil detach '$mountPath' 2> /dev/null`;
+        exec "hdiutil", "detach '$mountPath' 2> " . File::Spec->devnull();
         die "Could not unmount $diskImage at $mountPath" if $i > 100;
     }
     die "Can't mount $diskImage: $mountPath already exists!" if -e $mountPath;
@@ -393,7 +393,7 @@ sub mountAndRunNightly($$$$)
     $tempFile ||= "";
     `DYLD_FRAMEWORK_PATH=$frameworkPath WEBKIT_UNSET_DYLD_FRAMEWORK_PATH=YES $safari $tempFile`;
 
-    `hdiutil detach '$mountPath' 2> /dev/null`;
+    exec "hdiutil", "detach '$mountPath' 2> " . File::Spec->devnull();
 }
 
 sub parseRevisions($$;$)
diff --git a/WebKitTools/Scripts/resolve-ChangeLogs b/WebKitTools/Scripts/resolve-ChangeLogs
index db497f9..be58acb 100755
--- a/WebKitTools/Scripts/resolve-ChangeLogs
+++ b/WebKitTools/Scripts/resolve-ChangeLogs
@@ -408,7 +408,7 @@ sub fixOneMergedChangeLog($)
         close FILE;
 
         # Apply the new patch
-        open(PATCH, "| patch -p1 $file > /dev/null") or die $!;
+        open(PATCH, "| patch -p1 $file > " . File::Spec->devnull()) or die $!;
         print PATCH $newPatch;
         close(PATCH) or die $!;
 
@@ -460,7 +460,7 @@ sub mergeChanges($$$)
     unlink("${fileNewer}.orig");
     unlink("${fileNewer}.rej");
 
-    open(PATCH, "| patch --fuzz=3 --binary $fileNewer > /dev/null") or die $!;
+    open(PATCH, "| patch --fuzz=3 --binary $fileNewer > " . File::Spec->devnull()) or die $!;
     print PATCH fixChangeLogPatch($patch);
     close(PATCH);
 
diff --git a/WebKitTools/Scripts/run-iexploder-tests b/WebKitTools/Scripts/run-iexploder-tests
index f5e8a6c..ed5ecd6 100755
--- a/WebKitTools/Scripts/run-iexploder-tests
+++ b/WebKitTools/Scripts/run-iexploder-tests
@@ -32,6 +32,7 @@ use strict;
 use warnings;
 
 use Cwd;
+use File::Spec;
 use FindBin;
 use Getopt::Long;
 use IPC::Open2;
@@ -149,7 +150,7 @@ sub openHTTPDIfNeeded()
         "-c", "User \"#$<\"");
 
     my $retryCount = 20;
-    while (system("/usr/bin/curl -q --silent --stderr - --output /dev/null $listen") && $retryCount) {
+    while (system("/usr/bin/curl -q --silent --stderr - --output " . File::Spec->devnull() . " $listen") && $retryCount) {
         sleep 1;
         --$retryCount;
     }
diff --git a/WebKitTools/Scripts/run-jsc b/WebKitTools/Scripts/run-jsc
index 29ab355..e5341c1 100755
--- a/WebKitTools/Scripts/run-jsc
+++ b/WebKitTools/Scripts/run-jsc
@@ -30,6 +30,7 @@
 
 use strict;
 use warnings;
+use File::Spec;
 use FindBin;
 use lib $FindBin::Bin;
 use Getopt::Long;
@@ -44,7 +45,7 @@ GetOptions("count|c=i" => \$count,
 die "$usage\n" if (@ARGV < 1);
 
 my $jsc = jscProductDir() . "/jsc @ARGV";
-$jsc .= " 2> /dev/null" unless $verbose;
+$jsc .= " 2> " . File::Spec->devnull() unless $verbose;
 
 my $dyld = jscProductDir();
 
diff --git a/WebKitTools/Scripts/run-mangleme-tests b/WebKitTools/Scripts/run-mangleme-tests
index 93b7894..43ac74b 100755
--- a/WebKitTools/Scripts/run-mangleme-tests
+++ b/WebKitTools/Scripts/run-mangleme-tests
@@ -32,6 +32,7 @@ use strict;
 use warnings;
 
 use Cwd;
+use File::Spec;
 use FindBin;
 use Getopt::Long;
 use IPC::Open2;
@@ -152,7 +153,7 @@ sub openHTTPDIfNeeded()
         "-c", "User \"#$<\"");
 
     my $retryCount = 20;
-    while (system("/usr/bin/curl -q --silent --stderr - --output /dev/null $listen") && $retryCount) {
+    while (system("/usr/bin/curl -q --silent --stderr - --output " . File::Spec->devnull() . " $listen") && $retryCount) {
         sleep 1;
         --$retryCount;
     }
diff --git a/WebKitTools/Scripts/run-webkit-tests b/WebKitTools/Scripts/run-webkit-tests
index a08a53c..6056035 100755
--- a/WebKitTools/Scripts/run-webkit-tests
+++ b/WebKitTools/Scripts/run-webkit-tests
@@ -321,7 +321,7 @@ if (!defined($root)) {
     local *DEVNULL;
     my ($childIn, $childOut, $childErr);
     if ($quiet) {
-        open(DEVNULL, ">", File::Spec->devnull) or die "Failed to open /dev/null";
+        open(DEVNULL, ">", File::Spec->devnull()) or die "Failed to open /dev/null";
         $childOut = ">&DEVNULL";
         $childErr = ">&DEVNULL";
     } else {
@@ -1351,7 +1351,7 @@ sub openHTTPDIfNeeded()
     open2(\*HTTPDIN, \*HTTPDOUT, $httpdPath, @args);
 
     my $retryCount = 20;
-    while (system("/usr/bin/curl -q --silent --stderr - --output /dev/null $listen") && $retryCount) {
+    while (system("/usr/bin/curl -q --silent --stderr - --output " . File::Spec->devnull() . " $listen") && $retryCount) {
         sleep 1;
         --$retryCount;
     }
diff --git a/WebKitTools/Scripts/webkitdirs.pm b/WebKitTools/Scripts/webkitdirs.pm
index 8503b68..cabeb21 100644
--- a/WebKitTools/Scripts/webkitdirs.pm
+++ b/WebKitTools/Scripts/webkitdirs.pm
@@ -117,7 +117,7 @@ sub determineBaseProductDir
             unlink($personalPlistFile) || die "Could not delete $personalPlistFile: $!";
         }
 
-        open PRODUCT, "defaults read com.apple.Xcode PBXApplicationwideBuildSettings 2> /dev/null |" or die;
+        open PRODUCT, "defaults read com.apple.Xcode PBXApplicationwideBuildSettings 2> " . File::Spec->devnull() . " |" or die;
         $baseProductDir = join '', <PRODUCT>;
         close PRODUCT;
 
@@ -125,7 +125,7 @@ sub determineBaseProductDir
         undef $baseProductDir unless $baseProductDir =~ /^\//;
 
         if (!defined($baseProductDir)) {
-            open PRODUCT, "defaults read com.apple.Xcode PBXProductDirectory 2> /dev/null |" or die;
+            open PRODUCT, "defaults read com.apple.Xcode PBXProductDirectory 2> " . File::Spec->devnull() . " |" or die;
             $baseProductDir = <PRODUCT>;
             close PRODUCT;
             if ($baseProductDir) {

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list