diff options
author | Jürg Billeter <j@bitron.ch> | 2017-07-05 10:14:07 +0200 |
---|---|---|
committer | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2017-07-05 20:32:20 +0900 |
commit | 20f232c70d4ccc56278437817b1e9f88b134bad5 (patch) | |
tree | 0b7057b24d56f79501ad46bbf16fbb4d22754138 | |
parent | 0c94ff6024f39f837d3affed988f2dfbe114e24e (diff) | |
download | buildstream-20f232c70d4ccc56278437817b1e9f88b134bad5.tar.gz |
compose.py: Simplify cache key generation
Public data is now included when generating an element's cache key. Due
to this it is no longer necessary to include the split rules of
dependencies in the compose element's cache key calculation.
-rw-r--r-- | buildstream/plugins/elements/compose.py | 31 |
1 files changed, 1 insertions, 30 deletions
diff --git a/buildstream/plugins/elements/compose.py b/buildstream/plugins/elements/compose.py index 37f45d170..07d781ea6 100644 --- a/buildstream/plugins/elements/compose.py +++ b/buildstream/plugins/elements/compose.py @@ -62,29 +62,9 @@ class ComposeElement(Element): raise ElementError("{}: Compose elements may not have sources".format(self)) def get_unique_key(self): - # The output of this element will be effected depending - # on the splitting rules defined by the elements in this - # composition. - # - # As such, we include the split rules themselves in the - # cache key calculation. - # - include_rules = [ - { - 'element': elt.name, - 'splits': [ - { - 'domain': domain, - 'rules': rules - } - for domain, rules in sorted(self.splits(elt)) - ] - } - for elt in self.dependencies(Scope.BUILD) - ] return { 'integrate': self.integration, - 'include': include_rules, + 'include': self.include, 'orphans': self.include_orphans } @@ -166,15 +146,6 @@ class ComposeElement(Element): # And we're done return os.path.join(os.sep, 'buildstream', 'install') - # Generator for extracting the split rules to be included - # for a given element (which should be in the dependency chain) - def splits(self, element): - bstdata = element.get_public_data('bst') - splits = bstdata.get('split-rules') - for domain, rules in self.node_items(splits): - if not self.include or domain in self.include: - yield (domain, rules) - # Like os.path.getmtime(), but doesnt explode on symlinks # |