Author: damjan
Date: Sat Feb 6 11:51:01 2016
New Revision: 1728822
URL: http://svn.apache.org/viewvc?rev=1728822&view=rev
Log:
Exit the "./bootstrap" step with an error if some dependencies could not be
downloaded. If dependencies fail to download, the build usually fails later.
This is apparent on our buildbots. Rather catch it early.
Patch by: me
Modified:
openoffice/trunk/main/bootstrap.1
openoffice/trunk/main/solenv/bin/download_external_dependencies.pl
Modified: openoffice/trunk/main/bootstrap.1
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/bootstrap.1?rev=1728822&r1=1728821&r2=1728822&view=diff
==============================================================================
--- openoffice/trunk/main/bootstrap.1 (original)
+++ openoffice/trunk/main/bootstrap.1 Sat Feb 6 11:51:01 2016
@@ -40,6 +40,10 @@ chmod +x "$SRC_ROOT/solenv/bin/gccinstli
# fetch or update external tarballs
if [ "$DO_FETCH_TARBALLS" = "yes" ]; then
"$PERL" "$SOLARENV/bin/download_external_dependencies.pl"
$SRC_ROOT/external_deps.lst
+ if [ "$?" != "0" ]; then
+ echo "*** Error downloading external dependencies, please fix the
previous problems and try again ***"
+ exit 1
+ fi
fi
#
------------------------------------------------------------------------------
Modified: openoffice/trunk/main/solenv/bin/download_external_dependencies.pl
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/solenv/bin/download_external_dependencies.pl?rev=1728822&r1=1728821&r2=1728822&view=diff
==============================================================================
--- openoffice/trunk/main/solenv/bin/download_external_dependencies.pl
(original)
+++ openoffice/trunk/main/solenv/bin/download_external_dependencies.pl Sat Feb
6 11:51:01 2016
@@ -471,20 +471,25 @@ sub Download ()
}
# Download the missing files.
+ my $all_downloaded = 1;
for my $item (@Missing)
{
my ($name, $checksum, $urls) = @$item;
+ my $downloaded = 0;
foreach my $url (@$urls)
{
- last if DownloadFile(
+ $downloaded = DownloadFile(
defined $checksum
? $checksum->{'value'}."-".$name
: $name,
$url,
$checksum);
+ last if $downloaded
}
+ $all_downloaded &&= $downloaded;
}
+ die "some needed files could not be downloaded!" if !$all_downloaded;
}