diff options
Diffstat (limited to 'morphlib/artifact.py')
-rw-r--r-- | morphlib/artifact.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/morphlib/artifact.py b/morphlib/artifact.py index 82680709..20fdb185 100644 --- a/morphlib/artifact.py +++ b/morphlib/artifact.py @@ -26,6 +26,9 @@ class Artifact(object): * ``cache_id`` -- a dict describing the components of the cache key * ``dependencies`` -- list of Artifacts that need to be built beforehand * ``dependents`` -- list of Artifacts that need this Artifact to be built + * ``metadata_version`` -- When the format of the artifact metadata + changes, this version number is raised causing + any existing cached artifacts to be invalidated The ``dependencies`` and ``dependents`` lists MUST be modified by the ``add_dependencies`` and ``add_dependent`` methods only. @@ -39,6 +42,7 @@ class Artifact(object): self.cache_key = None self.dependencies = [] self.dependents = [] + self.metadata_version = 1 def add_dependency(self, artifact): '''Add ``artifact`` to the dependency list.''' |