From: Mark Huang Date: Thu, 22 Sep 2005 22:26:50 +0000 (+0000) Subject: - first try downloading the new PlanetLab-Bootstrap.tar.bz2, then fall X-Git-Tag: bootmanager-3_1_9~6 X-Git-Url: http://git.onelab.eu/?p=bootmanager.git;a=commitdiff_plain;h=135a90c0febf37f9c5aa42c7aaa3cb47958a02d8 - first try downloading the new PlanetLab-Bootstrap.tar.bz2, then fall back to the old alpina-BootstrapRPM.tar.bz2 --- diff --git a/source/steps/InstallBootstrapRPM.py b/source/steps/InstallBootstrapRPM.py index e30ae8f..4b8ecc8 100644 --- a/source/steps/InstallBootstrapRPM.py +++ b/source/steps/InstallBootstrapRPM.py @@ -126,16 +126,23 @@ def Run( vars, log ): # download and extract support tarball for # this step, which has everything # we need to successfully run - step_support_file= "PlanetLab-Bootstrap.tar.bz2" - source_file= "%s/%s" % (SUPPORT_FILE_DIR,step_support_file) - dest_file= "%s/%s" % (SYSIMG_PATH, step_support_file) - - # 30 is the connect timeout, 7200 is the max transfer time - # in seconds (2 hours) - log.write( "downloading %s\n" % step_support_file ) - result= bs_request.DownloadFile( source_file, None, None, - 1, 1, dest_file, - 30, 7200) + for step_support_file in [ "PlanetLab-Bootstrap.tar.bz2", + "alpina-BootstrapRPM.tar.bz2" ]: + source_file= "%s/%s" % (SUPPORT_FILE_DIR,step_support_file) + dest_file= "%s/%s" % (SYSIMG_PATH, step_support_file) + + # 30 is the connect timeout, 7200 is the max transfer time + # in seconds (2 hours) + log.write( "downloading %s\n" % step_support_file ) + result= bs_request.DownloadFile( source_file, None, None, + 1, 1, dest_file, + 30, 7200) + if result: + # New bootstrap tarball contains everything necessary to + # boot, no need to bootstrap further. + vars['SKIP_INSTALL_BASE']= (step_support_file == "PlanetLab-Bootstrap.tar.bz2") + break + if not result: raise BootManagerException, "Unable to download %s from server." % \ source_file