docs: say what a SHA1 lookup leaves out

The Data page said a SHA1 lookup was enough because MD5 and CRC32 declarations are filed under the collection file's SHA1 too. That holds only for a file the collection holds: 702 platform MD5s and 18 CRC32s are filed under their own value alone.
This commit is contained in:
Abdessamad Derraz committed 2026-11-05 19:32:51 +01:00
1 parent 525c06419b
commit 8cbd720480
2 files changed
+22 -3

No files matched your search

+17
View File
@@ -696,6 +696,23 @@ class ManifestsArePublished(unittest.TestCase):
self.assertLess(page.index("## Stable JSON endpoints"), page.index("The DAT is Logiqx XML"))
class TheLookupRecipeSaysWhatASha1Misses(unittest.TestCase):
"""The page said a SHA1 lookup was enough, "a setup that lists a file
by MD5 or CRC32 is filed under the SHA1 of the collection file it names
too". A record whose value no collection file answers has no SHA1: 702
platform MD5s were out of the recipe's reach."""
def test_the_page_and_the_records_agree(self):
record = {"layer": "platform", "algorithm": "md5", "value": "0" * 32,
"name": "dmg_boot.bin", "owner": "recalbox"}
self.assertEqual(generate_site._held_under_every_hash([record], {}, {}), [])
self.assertNotIn("sha1", record)
page = " ".join(generate_site.generate_data_page([]).split())
self.assertNotIn("none is needed", page)
self.assertIn("A list naming a file the collection lacks is filed under its MD5 "
"or CRC32 alone", page)
class AnIdLeadsToItsData(unittest.TestCase):
"""8.6: a system by its id, a core by the name the buildbot gives it."""