Consistent order of hashes

Fix #4513
This commit is contained in:
Frost Ming
2020-11-04 18:17:54 +08:00
parent 8e64873a01
commit 98d8e335b8
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -0,0 +1 @@
Make the order of hashes in resolution result stable.
+1 -1
View File
@@ -250,7 +250,7 @@ class Entry(object):
entry_hashes = set(self.entry.hashes)
locked_hashes = set(self.lockfile_entry.hashes)
if entry_hashes != locked_hashes and not self.is_updated:
self.entry_dict["hashes"] = list(entry_hashes | locked_hashes)
self.entry_dict["hashes"] = sorted(entry_hashes | locked_hashes)
self.entry_dict["name"] = self.name
if "version" in self.entry_dict:
self.entry_dict["version"] = self.strip_version(self.entry_dict["version"])