Skip to content

Commit 7bae37f

Browse files
committed
ostree-ext/store: use BTreeMap for merge commit metadata
`HashMap` is unordered which means that the conversion to GVariant (and thus its serialization) is not reproducible since the conversion basically just maps to an GVariant array. That in turns means the commit hash itself is not reproducible. All we really need to do is just swap it for a `BTreeMap` since all the types involved here implement ordering.
1 parent b290ad2 commit 7bae37f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ostree-ext/src/container/store.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1047,7 +1047,7 @@ impl ImageImporter {
10471047
let _ = self.layer_byte_progress.take();
10481048
let _ = self.layer_progress.take();
10491049

1050-
let mut metadata = HashMap::new();
1050+
let mut metadata = BTreeMap::new();
10511051
metadata.insert(
10521052
META_MANIFEST_DIGEST,
10531053
import.manifest_digest.to_string().to_variant(),

0 commit comments

Comments
 (0)