Skip to content
Snippets Groups Projects
Commit 162434b6 authored by André Anjos's avatar André Anjos :speech_balloon:
Browse files

[scripts][rebuild] Fix download url; Improve log messages

parent 713b4fbb
No related branches found
No related tags found
No related merge requests found
Pipeline #27667 passed
......@@ -157,17 +157,20 @@ def rebuild(recipe_dir, python, condarc, config, append_file,
destpath = os.path.join(condarc_options['croot'], arch,
os.path.basename(existing[0]))
logger.info('Downloading %s -> %s', existing[0], destpath)
urllib.request.urlretrieve(existing[0], destpath)
if not os.path.exists(os.path.dirname(destpath)):
os.makedirs(os.path.dirname(destpath))
src = channels[0] + existing[0]
logger.info('Downloading %s -> %s', src, destpath)
urllib.request.urlretrieve(src, destpath)
try:
logger.info('Testing %s', existing[0])
logger.info('Testing %s', src)
conda_build.api.test(destpath, config=conda_config)
should_build = False
logger.info('Test for %s: SUCCESS', existing[0])
logger.info('Test for %s: SUCCESS', src)
except Exception as error:
logger.exception(error)
logger.warn('Test for %s: FAILED. Building...', existing[0])
logger.warn('Test for %s: FAILED. Building...', src)
if should_build: #something wrong happened, run a full build
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment