summaryrefslogtreecommitdiff
path: root/morphlib/builder2.py
diff options
context:
space:
mode:
authorSam Thursfield <sam.thursfield@codethink.co.uk>2013-02-21 16:23:40 +0000
committerSam Thursfield <sam.thursfield@codethink.co.uk>2013-03-13 15:20:02 +0000
commit18b162cd4556eb8c63767916cd376d87630db1b7 (patch)
tree985bd6e1e854fba6095e65b924b941030fbbae1d /morphlib/builder2.py
parent0cc3de60d6282d22108ea59f169a0749be5e59ea (diff)
downloadmorph-18b162cd4556eb8c63767916cd376d87630db1b7.tar.gz
Don't include bootstrap chunks in output strata
This is necessary so that the build-essential stratum doesn't end up containing three different compilers.
Diffstat (limited to 'morphlib/builder2.py')
-rw-r--r--morphlib/builder2.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/morphlib/builder2.py b/morphlib/builder2.py
index f6a1bafa..f8f4ea88 100644
--- a/morphlib/builder2.py
+++ b/morphlib/builder2.py
@@ -461,13 +461,18 @@ class StratumBuilder(BuilderBase):
'''Build stratum artifacts.'''
+ def is_constituent(self, artifact): # pragma: no cover
+ '''True if artifact should be included in the stratum artifact'''
+ return (artifact.source.morphology['kind'] == 'chunk' and \
+ artifact.source.build_mode != 'bootstrap')
+
def build_and_cache(self): # pragma: no cover
with self.build_watch('overall-build'):
- constituents = [dependency
- for dependency in self.artifact.dependencies
- if dependency.source.morphology['kind'] == 'chunk']
+ constituents = [d for d in self.artifact.dependencies
+ if self.is_constituent(d)]
if len(constituents) == 0:
logging.warning('Stratum %s is empty' % self.artifact.name)
+
# the only reason the StratumBuilder has to download chunks is to
# check for overlap now that strata are lists of chunks
with self.build_watch('check-chunks'):