diff options
author | Lars Wirzenius <lars.wirzenius@codethink.co.uk> | 2012-05-17 10:52:04 +0000 |
---|---|---|
committer | Lars Wirzenius <lars.wirzenius@codethink.co.uk> | 2012-05-17 10:52:04 +0000 |
commit | db899d30fad37dc046c6329603dafa898a8b2821 (patch) | |
tree | c7d13e44849f2f4b90a890895cbbc318bc9d2317 /morphlib/builder2.py | |
parent | 9dfa4d9e120b70d26ae660b6a55e8d4bc198ff3f (diff) | |
download | morph-db899d30fad37dc046c6329603dafa898a8b2821.tar.gz |
Build chunk artifacts in a deterministic order
Previously, we were building them in whatever order
a Python dict returned the names of the artifacts,
and that is not deterministic.
Fixes bug S2192.
Diffstat (limited to 'morphlib/builder2.py')
-rw-r--r-- | morphlib/builder2.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/morphlib/builder2.py b/morphlib/builder2.py index 62e484f4..b993666e 100644 --- a/morphlib/builder2.py +++ b/morphlib/builder2.py @@ -317,7 +317,9 @@ class ChunkBuilder(BuilderBase): specs = { self.artifact.source.morphology['name']: ['.'], } - for artifact_name in specs: + names = specs.keys() + names.sort(key=lambda name: [ord(c) for c in name]) + for artifact_name in names: self.write_metadata(destdir, artifact_name) patterns = specs[artifact_name] patterns += [r'baserock/%s\.' % artifact_name] |