summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPedro Alvarez <pedro.alvarez@codethink.co.uk>2016-08-03 14:30:54 +0000
committerPedro Alvarez <pedro.alvarez@codethink.co.uk>2016-08-03 15:21:15 +0000
commita3d3e81914b4bcb157ce862e15196294ac943b52 (patch)
tree0aa8c53232b81ac030bafe68dd27e9ccc7325fda
parent8821f98c7c2dafae58add0ebacaad1da60a66ae2 (diff)
downloadmorph-a3d3e81914b4bcb157ce862e15196294ac943b52.tar.gz
CacheKeyComputer: add chunk-compatibility-version
Since we build chunks using the '-e' flag in `sh`, we might have different artifacts as result of building a chunk. It's better we change the cache-key of these so that we ensure that everything rebuilds, and we don't find the case where something that doesn't build, is already cached. Change-Id: Ic0fe8f9cf36b7787ebb08bd8200e0f1ea4cb01ef
-rw-r--r--morphlib/cachekeycomputer.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/morphlib/cachekeycomputer.py b/morphlib/cachekeycomputer.py
index 22f42aa0..946f5556 100644
--- a/morphlib/cachekeycomputer.py
+++ b/morphlib/cachekeycomputer.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2012-2015 Codethink Limited
+# Copyright (C) 2012-2016 Codethink Limited
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -127,7 +127,9 @@ class CacheKeyComputer(object):
for key in morph_dict:
if key not in ignored_fields:
keys[key] = morph_dict[key]
- if kind == 'stratum':
+ if kind == 'chunk':
+ keys['chunk-compatibility-version'] = 1
+ elif kind == 'stratum':
keys['stratum-format-version'] = 1
elif kind == 'system':
keys['system-compatibility-version'] = "2~ (upgradable, root rw)"