summaryrefslogtreecommitdiff
path: root/morphlib/artifact.py
diff options
context:
space:
mode:
authorRichard Dale <richard.dale@codethink.co.uk>2013-05-23 16:52:20 +0100
committerRichard Dale <richard.dale@codethink.co.uk>2013-05-24 15:52:37 +0100
commit54bc976b363bd34dfd39ba343530b8bc42cb0715 (patch)
tree1c8e130abfd9bc9b8079ea0fb73efa8060e906a6 /morphlib/artifact.py
parent8a113747fc9aef15592f8ae0cabd027575e97caa (diff)
downloadmorph-54bc976b363bd34dfd39ba343530b8bc42cb0715.tar.gz
Include the artifact metadata-version in the cache id key
Diffstat (limited to 'morphlib/artifact.py')
-rw-r--r--morphlib/artifact.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/morphlib/artifact.py b/morphlib/artifact.py
index 2f9c65df..20fdb185 100644
--- a/morphlib/artifact.py
+++ b/morphlib/artifact.py
@@ -24,9 +24,11 @@ class Artifact(object):
* ``name`` -- the name of the artifact
* ``cache_key`` -- a cache key to uniquely identify the artifact
* ``cache_id`` -- a dict describing the components of the cache key
- * ``contents`` -- a list of the installed files or chunks in the artifact
* ``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.
@@ -40,7 +42,7 @@ class Artifact(object):
self.cache_key = None
self.dependencies = []
self.dependents = []
- self.contents = []
+ self.metadata_version = 1
def add_dependency(self, artifact):
'''Add ``artifact`` to the dependency list.'''