summaryrefslogtreecommitdiff
path: root/morphlib/cachekeycomputer.py
diff options
context:
space:
mode:
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')