diff options
author | Adam Coldrick <adam.coldrick@codethink.co.uk> | 2014-08-01 09:59:43 +0000 |
---|---|---|
committer | Adam Coldrick <adam.coldrick@codethink.co.uk> | 2014-08-01 09:59:43 +0000 |
commit | 4124c50b8dc3dfb0ffb933153d0fe6385edf389c (patch) | |
tree | 056a0b34a7926434497e9f9fe809f1e595f96224 | |
parent | f860d3e7b0e14b01b31d4f3d63a8c37572cd9fdc (diff) | |
download | morph-4124c50b8dc3dfb0ffb933153d0fe6385edf389c.tar.gz |
Ensure that none of the _orig_* fields are in the cache keybaserock/adamcoldrick/no-orig-fields-in-cache-keybaserock/adamcoldrick/no-fake-morph
morph2.Morphology adds a number of fields beginning with _orig_, which
contain default values. There is no reason for these values to be in
the cache key, and this fixes a bug where distbuild created systems with
a different cache key than local builds did when the configuration
extensions list was empty.
-rw-r--r-- | morphlib/cachekeycomputer.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/morphlib/cachekeycomputer.py b/morphlib/cachekeycomputer.py index 292047c8..73cc75f3 100644 --- a/morphlib/cachekeycomputer.py +++ b/morphlib/cachekeycomputer.py @@ -122,7 +122,8 @@ class CacheKeyComputer(object): # products is omitted as they are part of the split-rules elif kind in ('system', 'stratum'): morphology = artifact.source.morphology - morph_dict = dict((k, morphology[k]) for k in morphology.keys()) + morph_dict = dict((k, morphology[k]) for k in morphology.keys() + if not k.startswith('_orig_')) # Disregard all fields of a morphology that aren't important ignored_fields = ( |