Title: [191784] trunk/Tools
- Revision
- 191784
- Author
- [email protected]
- Date
- 2015-10-30 01:48:08 -0700 (Fri, 30 Oct 2015)
Log Message
[JHBuild] Do not try to update the dependencies if jhbuild configuration hasn't changed
https://bugs.webkit.org/show_bug.cgi?id=150665
Patch by Carlos Garcia Campos <[email protected]> on 2015-10-30
Reviewed by Csaba Osztrogonác.
We check it only to wipe the directory or not, but we are still
tryihng to update every module even when the configuration hasn't
changed. This is problematic because it makes the whole build fail
when any repository fails to checkout an already checked out
revision, because the server is down for example. This is even
more problematic for the bots that skip perfectly valid revisions.
It's still possible to force an update passing --force command
line argument.
* Scripts/update-webkit-libs-jhbuild:
(deleteJhbuildMd5): Delete the md5sum files if exist.
(runJhbuild): Return early if the md5sum files haven't
changed. Only write them after a successful build and delete them
if the build fails to ensure we don't skip next run.
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (191783 => 191784)
--- trunk/Tools/ChangeLog 2015-10-30 08:31:24 UTC (rev 191783)
+++ trunk/Tools/ChangeLog 2015-10-30 08:48:08 UTC (rev 191784)
@@ -1,3 +1,25 @@
+2015-10-30 Carlos Garcia Campos <[email protected]>
+
+ [JHBuild] Do not try to update the dependencies if jhbuild configuration hasn't changed
+ https://bugs.webkit.org/show_bug.cgi?id=150665
+
+ Reviewed by Csaba Osztrogonác.
+
+ We check it only to wipe the directory or not, but we are still
+ tryihng to update every module even when the configuration hasn't
+ changed. This is problematic because it makes the whole build fail
+ when any repository fails to checkout an already checked out
+ revision, because the server is down for example. This is even
+ more problematic for the bots that skip perfectly valid revisions.
+ It's still possible to force an update passing --force command
+ line argument.
+
+ * Scripts/update-webkit-libs-jhbuild:
+ (deleteJhbuildMd5): Delete the md5sum files if exist.
+ (runJhbuild): Return early if the md5sum files haven't
+ changed. Only write them after a successful build and delete them
+ if the build fails to ensure we don't skip next run.
+
2015-10-30 Philippe Normand <[email protected]>
[GTK] Fix MacCLang build errors in Tools
Modified: trunk/Tools/Scripts/update-webkit-libs-jhbuild (191783 => 191784)
--- trunk/Tools/Scripts/update-webkit-libs-jhbuild 2015-10-30 08:31:24 UTC (rev 191783)
+++ trunk/Tools/Scripts/update-webkit-libs-jhbuild 2015-10-30 08:48:08 UTC (rev 191784)
@@ -25,14 +25,19 @@
my $platform = "";
$platform = "efl" if isEfl();
$platform = "gtk" if isGtk();
-my $wipeOnChange = $ENV{JHBUILD_WIPE_ON_CHANGE} // 1;
if (!$platform) {
die "No platform specified for " . basename($0) .". Use --gtk or --efl.\n";
}
-GetOptions('wipe-on-change!' => \$wipeOnChange,);
+my $wipeOnChange = $ENV{JHBUILD_WIPE_ON_CHANGE} // 1;
+my $force = 0;
+GetOptions(
+ 'wipe-on-change!' => \$wipeOnChange,
+ 'force' => \$force
+);
+
sub getMD5HashForFile($)
{
my $file = shift;
@@ -85,12 +90,23 @@
}
}
+sub deleteJhbuildMd5() {
+ my $jhbuildPath = getJhbuildPath();
+ if (!-d $jhbuildPath) {
+ return;
+ }
+ foreach my $file (qw(jhbuildrc jhbuild.modules)) {
+ my $md5File = join('/', $jhbuildPath, $file) . ".md5sum";
+ unlink($md5File) if -e $md5File;
+ }
+}
+
sub runJhbuild
{
my $command = shift;
my @jhbuildArgs = ("./jhbuild-wrapper", "--".$platform, $command);
push(@jhbuildArgs, @ARGV[0..$#ARGV]);
- system(@jhbuildArgs) == 0 or die "Running jhbuild-wrapper " . $command . " failed.\n";
+ return system(@jhbuildArgs);
}
sub cleanJhbuild()
@@ -114,11 +130,19 @@
my %prettyPlatform = ( "efl" => "EFL", "gtk" => "GTK+" );
-if ($wipeOnChange && -e getJhbuildPath() && jhbuildConfigurationChanged()) {
+if (!$force && !jhbuildConfigurationChanged()) {
+ print $prettyPlatform{$platform} . " port dependencies are already up to date\n";
+ exit 0;
+}
+
+if ($wipeOnChange && -e getJhbuildPath()) {
cleanJhbuild();
}
-saveJhbuildMd5();
-
print "Updating " . $prettyPlatform{$platform} . " port dependencies using jhbuild...\n";
-runJhbuild("build");
+if (runJhbuild("build") == 0) {
+ saveJhbuildMd5();
+} else {
+ deleteJhbuildMd5();
+ die "Failed to build " . $prettyPlatform{$platform} . " port dependencies with jhbuild\n";
+}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes