summaryrefslogtreecommitdiff
path: root/morphlib/cachekeycomputer.py
diff options
context:
space:
mode:
authorTiago Gomes <tiago.gomes@codethink.co.uk>2015-11-20 13:57:31 +0000
committerTiago Gomes <tiago.gomes@codethink.co.uk>2015-11-20 14:09:18 +0000
commitd5b0d37ad9343b8d66fe99648d305a41199d3920 (patch)
treedb3966aca61264e2ef2635bace6c4667bbd21abb /morphlib/cachekeycomputer.py
parenta75e5121478e2a645c65d276cc20f3eb659222f4 (diff)
downloadmorph-d5b0d37ad9343b8d66fe99648d305a41199d3920.tar.gz
WIP Add support for multiple sources per chunkbaserock/tiagogomes/multiple-sources
TODO: - Add API to the cache server to retrieve a submodule commit from a given path. - Fix cross-bootstrap command. Change-Id: I3475c2bcb648a272fee33bc878a521f79d4e6581
Diffstat (limited to 'morphlib/cachekeycomputer.py')
-rw-r--r--morphlib/cachekeycomputer.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/morphlib/cachekeycomputer.py b/morphlib/cachekeycomputer.py
index 22f42aa0..ff0d595a 100644
--- a/morphlib/cachekeycomputer.py
+++ b/morphlib/cachekeycomputer.py
@@ -96,6 +96,11 @@ class CacheKeyComputer(object):
keys['split-rules'] = [(a, [rgx.pattern for rgx in r._regexes])
for (a, r) in source.split_rules]
+ # Avoid adding the 'extra-trees' key if there were no
+ # extra-sources, to avoid unnecessary rebuilds
+ if source.subtrees: # pragma no cover
+ keys['extra-trees'] = source.subtrees
+
# Include morphology contents, since it doesn't always come
# from the source tree
keys['devices'] = morphology.get('devices')