From a3d3e81914b4bcb157ce862e15196294ac943b52 Mon Sep 17 00:00:00 2001 From: Pedro Alvarez Date: Wed, 3 Aug 2016 14:30:54 +0000 Subject: 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 --- morphlib/cachekeycomputer.py | 6 ++++-- 1 file 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)" -- cgit v1.2.1