diff options
author | Jürg Billeter <j@bitron.ch> | 2017-07-19 08:03:48 +0200 |
---|---|---|
committer | Jürg Billeter <j@bitron.ch> | 2017-07-20 07:24:56 +0200 |
commit | c2ea0261edde20fde204d2cace280084d0c9e2a9 (patch) | |
tree | fd9be082379406661e068b815b54dbdf4a8339fd | |
parent | 4fdd4d5fa4df797a84272d9ffa4bedcc4baf8af0 (diff) | |
download | buildstream-c2ea0261edde20fde204d2cace280084d0c9e2a9.tar.gz |
element.py: Add _skip_push()
-rw-r--r-- | buildstream/element.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/buildstream/element.py b/buildstream/element.py index dbdc090cf..d5409996f 100644 --- a/buildstream/element.py +++ b/buildstream/element.py @@ -1119,6 +1119,23 @@ class Element(Plugin): self.info("Downloaded artifact {}".format(display_key)) return True + # _skip_push(): + # + # Determine whether element should be pushed. + # + # Returns: + # (bool): True if this element should not be pushed + # + def _skip_push(self): + self._assert_cached() + + # Do not push tained artifact + if self._tainted(): + return True + + # Do not push artifact that is already in the remote artifact repository + return self.__artifacts.remote_contains_key(self, self._get_cache_key_from_artifact()) + # _push(): # # Push locally cached artifact to remote artifact repository. |