+2015-10-30 Carlos Garcia Campos <cgarcia@igalia.com>
+
+ [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 <pnormand@igalia.com>
[GTK] Fix MacCLang build errors in Tools
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($)
{
}
}
+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()
my %prettyPlatform = ( "efl" => "EFL", "gtk" => "GTK+" );
-if ($wipeOnChange && -e getJhbuildPath() && jhbuildConfigurationChanged()) {
- cleanJhbuild();
+if (!$force && !jhbuildConfigurationChanged()) {
+ print $prettyPlatform{$platform} . " port dependencies are already up to date\n";
+ exit 0;
}
-saveJhbuildMd5();
+if ($wipeOnChange && -e getJhbuildPath()) {
+ cleanJhbuild();
+}
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";
+}