summaryrefslogtreecommitdiff
path: root/morphlib/plugins/cross-bootstrap_plugin.py
diff options
context:
space:
mode:
authorSam Thursfield <sam.thursfield@codethink.co.uk>2014-06-03 14:23:17 (GMT)
committerSam Thursfield <sam.thursfield@codethink.co.uk>2014-06-03 16:16:06 (GMT)
commitbfcae5cb0369c837b9acd8005a2f45496a18a81d (patch)
treecf5ddba13f82febbaa0d43477060c235b4a83240 /morphlib/plugins/cross-bootstrap_plugin.py
parentd87d73d2121638cb12f3a17ca01562f2d3e33e48 (diff)
downloadmorph-bfcae5cb0369c837b9acd8005a2f45496a18a81d.tar.gz
Improve robustness when fetching artifacts from remote artifact cache
Previously Morph would check if an artifact is present in the remote artifact cache, then fetch the necessary files. If an error occured during fetching, it would raise an error and abort. Instead, we should just try and fetch the files and if anything fails, move on to building locally. This avoids the situation where an error in the remote cache makes local building impossible, which we experienced recently.
Diffstat (limited to 'morphlib/plugins/cross-bootstrap_plugin.py')
-rw-r--r--morphlib/plugins/cross-bootstrap_plugin.py14
1 files changed, 2 insertions, 12 deletions
diff --git a/morphlib/plugins/cross-bootstrap_plugin.py b/morphlib/plugins/cross-bootstrap_plugin.py
index ec0cfbc..bfd0d04 100644
--- a/morphlib/plugins/cross-bootstrap_plugin.py
+++ b/morphlib/plugins/cross-bootstrap_plugin.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2013 Codethink Limited
+# Copyright (C) 2013-2014 Codethink Limited
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -299,18 +299,8 @@ class CrossBootstrapPlugin(cliapp.Plugin):
'Nothing to cross-compile. Only chunks built in \'bootstrap\' '
'mode can be cross-compiled.')
- # FIXME: merge with build-command's code
for i, a in enumerate(cross_chunks):
- if build_command.is_built(a):
- self.app.status(msg='The %(kind)s %(name)s is already built',
- kind=a.source.morphology['kind'],
- name=a.name)
- build_command.cache_artifacts_locally([a])
- else:
- self.app.status(msg='Cross-building %(kind)s %(name)s',
- kind=a.source.morphology['kind'],
- name=a.name)
- build_command.build_artifact(a, build_env)
+ build_command.cache_or_build_artifact(a, build_env)
for i, a in enumerate(native_chunks):
build_command.get_sources(a)