Title: [111668] trunk/Tools
Revision
111668
Author
carlo...@webkit.org
Date
2012-03-22 03:50:32 -0700 (Thu, 22 Mar 2012)

Log Message

[GTK] Allow to run any jhbuild command with jhbuild-wrapper script
https://bugs.webkit.org/show_bug.cgi?id=81888

Reviewed by Philippe Normand.

* Scripts/update-webkit-libs-jhbuild:
(runJhbuild): Helper function to run jhbuild with a given command.
Instead of running jhbuild directly, use the jhbuild-wrapper, so
that we don't need to run it first to check whether jhbuild is
installed or not.
* efl/run-with-jhbuild: Call jhbuild-wrapper with run command.
* gtk/run-with-jhbuild: Ditto.
* jhbuild/jhbuild-wrapper: Allow to execute any jhbuild command,
not only run.

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (111667 => 111668)


--- trunk/Tools/ChangeLog	2012-03-22 10:45:51 UTC (rev 111667)
+++ trunk/Tools/ChangeLog	2012-03-22 10:50:32 UTC (rev 111668)
@@ -1,3 +1,20 @@
+2012-03-22  Carlos Garcia Campos  <cgar...@igalia.com>
+
+        [GTK] Allow to run any jhbuild command with jhbuild-wrapper script
+        https://bugs.webkit.org/show_bug.cgi?id=81888
+
+        Reviewed by Philippe Normand.
+
+        * Scripts/update-webkit-libs-jhbuild:
+        (runJhbuild): Helper function to run jhbuild with a given command.
+        Instead of running jhbuild directly, use the jhbuild-wrapper, so
+        that we don't need to run it first to check whether jhbuild is
+        installed or not.
+        * efl/run-with-jhbuild: Call jhbuild-wrapper with run command.
+        * gtk/run-with-jhbuild: Ditto.
+        * jhbuild/jhbuild-wrapper: Allow to execute any jhbuild command,
+        not only run.
+
 2012-03-22  Philippe Normand  <pnorm...@igalia.com>
 
         Unreviewed, test-webkitpy fix after r111661.

Modified: trunk/Tools/Scripts/update-webkit-libs-jhbuild (111667 => 111668)


--- trunk/Tools/Scripts/update-webkit-libs-jhbuild	2012-03-22 10:45:51 UTC (rev 111667)
+++ trunk/Tools/Scripts/update-webkit-libs-jhbuild	2012-03-22 10:50:32 UTC (rev 111668)
@@ -41,21 +41,18 @@
     }
 }
 
+sub runJhbuild
+{
+    my $command = shift;
+    my @jhbuildArgs = ("./jhbuild-wrapper", "--".$platform, $command);
+    push(@jhbuildArgs, @ARGV[2..-1]);
+    system(@jhbuildArgs) == 0 or die "Running jhbuild-wrapper " . $command . " failed.\n";
+}
+
 delete $ENV{AR_FLAGS} if exists $ENV{AR_FLAGS};
 
 chdir(relativeScriptsDir() . "/../jhbuild") or die $!;
 
-my @ensureJhbuildArgs = ("./jhbuild-wrapper", "--".$platform, "echo", "Ensured jhbuild setup.");
-if (system(@ensureJhbuildArgs) != 0) {
-    die "Failed to ensure jhbuild installed.\n";
-}
-
-chdir(relativeScriptsDir() . "/../".$platform) or die $!;
-
 my %prettyPlatform = ( "efl" => "EFL", "gtk" => "GTK+" );
 print "Updating " . $prettyPlatform{$platform} . " port dependencies using jhbuild...\n";
-my @jhbuildArgs = ("../../WebKitBuild/Dependencies/Root/bin/jhbuild", "--no-interact", "-f", "jhbuildrc");
-push(@jhbuildArgs, @ARGV[2..-1]);
-if (system(@jhbuildArgs) != 0) {
-    die "Running jhbuild failed.\n"
-}
+runJhbuild("build");

Modified: trunk/Tools/efl/run-with-jhbuild (111667 => 111668)


--- trunk/Tools/efl/run-with-jhbuild	2012-03-22 10:45:51 UTC (rev 111667)
+++ trunk/Tools/efl/run-with-jhbuild	2012-03-22 10:50:32 UTC (rev 111668)
@@ -21,6 +21,6 @@
 import sys
 
 jhbuild_wrapper = common.top_level_path('Tools', 'jhbuild', 'jhbuild-wrapper')
-process = subprocess.Popen([jhbuild_wrapper, '--efl'] + sys.argv[1:])
+process = subprocess.Popen([jhbuild_wrapper, '--efl', 'run'] + sys.argv[1:])
 process.wait()
 sys.exit(process.returncode)

Modified: trunk/Tools/gtk/run-with-jhbuild (111667 => 111668)


--- trunk/Tools/gtk/run-with-jhbuild	2012-03-22 10:45:51 UTC (rev 111667)
+++ trunk/Tools/gtk/run-with-jhbuild	2012-03-22 10:50:32 UTC (rev 111668)
@@ -22,6 +22,6 @@
 import sys
 
 jhbuild_wrapper = common.top_level_path('Tools', 'jhbuild', 'jhbuild-wrapper')
-process = subprocess.Popen([jhbuild_wrapper, '--gtk'] + sys.argv[1:])
+process = subprocess.Popen([jhbuild_wrapper, '--gtk', 'run'] + sys.argv[1:])
 process.wait()
 sys.exit(process.returncode)

Modified: trunk/Tools/jhbuild/jhbuild-wrapper (111667 => 111668)


--- trunk/Tools/jhbuild/jhbuild-wrapper	2012-03-22 10:45:51 UTC (rev 111667)
+++ trunk/Tools/jhbuild/jhbuild-wrapper	2012-03-22 10:50:32 UTC (rev 111668)
@@ -135,6 +135,6 @@
     sys.exit(e)
 ensure_jhbuild()
 
-process = subprocess.Popen([jhbuild_path, '--no-interact', '-f', top_level_path('Tools', platform, 'jhbuildrc'), 'run'] + sys.argv[2:])
+process = subprocess.Popen([jhbuild_path, '--no-interact', '-f', top_level_path('Tools', platform, 'jhbuildrc')] + sys.argv[2:])
 process.wait()
 sys.exit(process.returncode)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to