diff options
author | Jürg Billeter <j@bitron.ch> | 2017-07-12 15:38:58 +0200 |
---|---|---|
committer | Jürg Billeter <j@bitron.ch> | 2017-07-14 14:13:51 +0200 |
commit | 0cdd17413a74e1745ae95da93c16b7dbc57451a3 (patch) | |
tree | 272400a9ec00c303269db503053eb942011766d5 /buildstream/element.py | |
parent | f43aa7bbbf8cc02faecbeb7a279d47bf97f6beca (diff) | |
download | buildstream-0cdd17413a74e1745ae95da93c16b7dbc57451a3.tar.gz |
element.py: Use appropriate cache key in _get_full_display_key()
Diffstat (limited to 'buildstream/element.py')
-rw-r--r-- | buildstream/element.py | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/buildstream/element.py b/buildstream/element.py index 4993b6700..b864d8f8c 100644 --- a/buildstream/element.py +++ b/buildstream/element.py @@ -860,13 +860,22 @@ class Element(Plugin): # def _get_full_display_key(self): context = self.get_context() - cache_key = self._get_cache_key() - dim_key = False + cache_key = None + dim_key = True + + if self._consistency() == Consistency.INCONSISTENT: + cache_key = None + elif context.strict_build_plan or self._cached(strength=_KeyStrength.STRONG): + cache_key = self._get_cache_key() + elif self._cached(): + cache_key = self._get_cache_key_from_artifact() + elif self._buildable(): + cache_key = self._get_cache_key_for_build() if not cache_key: cache_key = "{:?<64}".format('') - # Show unresolved cache keys as dim - dim_key = True + elif self._get_cache_key() == cache_key: + dim_key = False length = min(len(cache_key), context.log_key_length) return (cache_key, cache_key[0:length], dim_key) |