fix: say what differs in games index --check

--check printed only STALE and a path, after the whole coverage table. It now skips the table, names what changed in each document (an added file, a changed key) and the command that writes them. The published index lagged the RetroArch manifest by ep128emu/roms/ide12.rom and is regenerated.
This commit is contained in:
Abdessamad Derraz committed 2026-11-05 19:17:23 +01:00
1 parent 891741433b
commit dd904e2fab
4 files changed
+98 -5

No files matched your search

+1 -1
View File
@@ -1 +1 @@
{"files":[["128-0.rom",16384,"bios"],["128-1.rom",16384,"bios"],["128-spanish-0.rom",16384,"bios"],["128-spanish-1.rom",16384,"bios"],["22vp931.zip",1405,"bios"],["32X_G_BIOS.bin",256,"bios"],["32X_M_BIOS.bin",2048,"bios"],["32X_S_BIOS.bin",1024,"bios"],["3c505.zip",10896,"bios"],["3do_arcade_saot.bin",524288,"bios"],["3xtwin.zip",1417,"bios"],["48.rom",16384,"bios"],["4dparprn.zip",409,"bios"],["5200.rom",2048,"bios"],["64DD_IPL.bin",4194304,"bios"],["6570-036.rom",2048,"bios"],["68HC05.rom",8192,"bios"],["7800 BIOS (E).rom",16384,"bios"],["7800 BIOS (U).rom",4096,"bios"],["ATARIBAS.ROM",8192,"bios"],["ATARIOSA.ROM",10240,"bios"],["ATARIOSB.ROM",10240,"bios"],["ATARIXL.ROM",16384,"bios"],["Azahar/Azahar/nand/private/movable.sed",320,"bios"],["Azahar/Azahar/nand/rw/sys/LocalFriendCodeSeed_B",272,"bios"],["Azahar/Azahar/nand/rw/sys/SecureInfo_A",273,"bios"],["Azahar/Azahar/sysdata/keys.txt",7424,"bios"],["Azahar/Azahar/sysdata/otp.bin",256,"bios"],["Azahar/Azahar/sysdata/seeddb.bin",53264,"bios"],["Azahar/Azahar/sysdata/shared_font.bin",3145728,"bios"],["BB01R4_OS.ROM",16384,"bios"],["BBKEmu/A4980/8.BIN",2097152,"bios"],["BBKEmu/A4980/E.BIN",2097152,"bios"],["BIOS.col",8192,"bios"],["BS-X (En) (DRM-Free).bin",1048576,"bios"],["BS-X (En).bin",1048576,"bios"],["BS-X.bin",1048576,"bios"],["CARTS.SHA",33152,"bios"],["CM32LN_CONTROL.ROM",65536,"bios"],["CM32L_CONTROL.ROM",65536,"bios"],["CM32L_PCM.ROM",1048576,"bios"],["CYRILLIC.FNT",2048,"bios"],["Cemu/cafeLibs/erreula.rpl",790080,"bios"],["Cemu/cafeLibs/snd_user.rpl",84032,"bios"],["Cemu/cafeLibs/snduser2.rpl",111360,"bios"],["Cemu/cafeLibs/swkbd.rpl",1116288,"bios"],["Cemu/keys.txt",449507,"bios"],["Cemu/mlc01/sys/title/0005001b/10042400/content/CafeCn.ttf",13110604,"bios"],["Cemu/mlc01/sys/title/0005001b/10042400/content/CafeKr.ttf",2260660,"bios"],["Cemu/mlc01/sys/title/0005001b/10042400/content/CafeStd.ttf",2442464,"bios"],["Cemu/mlc01/sys/title/0005001b/10042400/content/CafeTw.ttf",8229724,"bios"],["Cemu/mlc01/sys/title/0005001b/1004f000/content/00/swkbd/swkbd.pack",1907900,"bios"],["Cemu/mlc01/sys/title/0005001b/10051000/content/00/erreula/erreula.pack",1252759,"bios"],["Cemu/mlc01/sys/title/0005001b/10054000/content/ccerts/WIIU_ACCOUNT_1_CERT.der",1226,"bios"],["Cemu/mlc01/sys/title/0005001b/10054000/content/ccerts/WIIU_ACCOUNT_1_RSA_KEY.aes",1200,"bios"],["Cemu/mlc01/sys/title/0005001b/10054000/content/ccerts/WIIU_COMMON_1_CERT.der",1224,"bios"],["Cemu/mlc01/sys/title/0005001b/10054000/content/ccerts/WIIU_COMMON_1_RSA_KEY.aes",1200,"bios"],["Cemu/mlc01/sys/title/0005001b/10054000/content/ccerts/WIIU_OLIVE_1_CERT.der",1224,"bios"],["Cemu/mlc01/sys/title/0005001b/10054000/content/ccerts/WIIU_OLIVE_1_RSA_KEY.aes",1200,"bios"],["Cemu/mlc01/sys/title/0005001b/10054000/content/ccerts/WIIU_VINO_1_CERT.der",1223,"bios"],["Cemu/mlc01/sys/title/0005001b/10054000/content/ccerts/WIIU_VINO_1_RSA_KEY.aes",1200,"bios"],["Cemu/mlc01/sys/title/0005001b/10054000/content/ccerts/WIIU_WOOD_1_CERT.der",1223,"bios"],["Cemu/mlc01/sys/title/0005001b/10054000/content/ccerts/WIIU_WOOD_1_RSA_KEY.aes",1200,"bios"],["Cemu/mlc01/sys/title/0005001b/10054000/content/scerts/ADDTRUST_EXT_CA_ROOT.der",1082,"bios"],["Cemu/mlc01/sys/title/0005001b/10054000/content/scerts/BALTIMORE_CYBERTRUST_ROOT_CA.der",891,"bios"],["Cemu/mlc01/sys/title/0005001b/10054000/content/scerts/CACERT_NINTENDO_CA.der",897,"bios"],["Cemu/mlc01/sys/title/0005001b/10054000/content/scerts/CACERT_NINTENDO_CA_G2.der",1173,"bios"],["Cemu/mlc01/sys/title/0005001b/10054000/content/scerts/CACERT_NINTENDO_CA_G3.der",1060,"bios"],["Cemu/mlc01/sys/title/0005001b/10054000/content/scerts/CACERT_NINTENDO_CLASS2_CA.der",924,"bios"],["Cemu/mlc01/sys/title/0005001b/10054000/content/scerts/CACERT_NINTENDO_CLASS2_CA_G2.der",1200,"bios"],["Cemu/mlc01/sys/title/0005001b/10054000/content/scerts/CACERT_NINTENDO_CLASS2_CA_G3.der",1200,"bios"],["Cemu/mlc01/sys/title/0005001b/10054000/content/scerts/COMODO_CA.der",980,"bios"],["Cemu/mlc01/sys/title/0005001b/10054000/content/scerts/CYBERTRUST_GLOBAL_ROOT_CA.der",933,"bios"],["Cemu/mlc01/sys/title/0005001b/10054000/content/scerts/DIGICERT_ASSURED_ID_ROOT_CA.der",955,"bios"],["Cemu/mlc01/sys/title/0005001b/10054000/content/scerts/DIGICERT_ASSURED_ID_ROOT_CA_G2.der",922,"bios"],["Cemu/mlc01/sys/title/0005001b/10054000/content/scerts/DIGICERT_GLOBAL_ROOT_CA.der",947,"bios"],["Cemu/mlc01/sys/title/0005001b/10054000/content/scerts/DIGICERT_GLOBAL_ROOT_CA_G2.der",914,"bios"],["Cemu/mlc01/sys/title/0005001b/10054000/content/scerts/DIGICERT_HIGH_ASSURANCE_EV_ROOT_CA.der",969,"bios"],["Cemu/mlc01/sys/title/0005001b/10054000/content/scerts/ENTRUST_CA_2048.der",1070,"bios"],["Cemu/mlc01/sys/title/0005001b/10054000/content/scerts/ENTRUST_ROOT_CA.der",1173,"bios"],["Cemu/mlc01/sys/title/0005001b/10054000/content/scerts/ENTRUST_ROOT_CA_G2.der",1090,"bios"],["Cemu/mlc01/sys/title/0005001b/10054000/content/scerts/ENTRUST_SECURE_SERVER_CA.der",1244,"bios"],["Cemu/mlc01/sys/title/0005001b/10054000/content/scerLine truncated
{"files":[["128-0.rom",16384,"bios"],["128-1.rom",16384,"bios"],["128-spanish-0.rom",16384,"bios"],["128-spanish-1.rom",16384,"bios"],["22vp931.zip",1405,"bios"],["32X_G_BIOS.bin",256,"bios"],["32X_M_BIOS.bin",2048,"bios"],["32X_S_BIOS.bin",1024,"bios"],["3c505.zip",10896,"bios"],["3do_arcade_saot.bin",524288,"bios"],["3xtwin.zip",1417,"bios"],["48.rom",16384,"bios"],["4dparprn.zip",409,"bios"],["5200.rom",2048,"bios"],["64DD_IPL.bin",4194304,"bios"],["6570-036.rom",2048,"bios"],["68HC05.rom",8192,"bios"],["7800 BIOS (E).rom",16384,"bios"],["7800 BIOS (U).rom",4096,"bios"],["ATARIBAS.ROM",8192,"bios"],["ATARIOSA.ROM",10240,"bios"],["ATARIOSB.ROM",10240,"bios"],["ATARIXL.ROM",16384,"bios"],["Azahar/Azahar/nand/private/movable.sed",320,"bios"],["Azahar/Azahar/nand/rw/sys/LocalFriendCodeSeed_B",272,"bios"],["Azahar/Azahar/nand/rw/sys/SecureInfo_A",273,"bios"],["Azahar/Azahar/sysdata/keys.txt",7424,"bios"],["Azahar/Azahar/sysdata/otp.bin",256,"bios"],["Azahar/Azahar/sysdata/seeddb.bin",53264,"bios"],["Azahar/Azahar/sysdata/shared_font.bin",3145728,"bios"],["BB01R4_OS.ROM",16384,"bios"],["BBKEmu/A4980/8.BIN",2097152,"bios"],["BBKEmu/A4980/E.BIN",2097152,"bios"],["BIOS.col",8192,"bios"],["BS-X (En) (DRM-Free).bin",1048576,"bios"],["BS-X (En).bin",1048576,"bios"],["BS-X.bin",1048576,"bios"],["CARTS.SHA",33152,"bios"],["CM32LN_CONTROL.ROM",65536,"bios"],["CM32L_CONTROL.ROM",65536,"bios"],["CM32L_PCM.ROM",1048576,"bios"],["CYRILLIC.FNT",2048,"bios"],["Cemu/cafeLibs/erreula.rpl",790080,"bios"],["Cemu/cafeLibs/snd_user.rpl",84032,"bios"],["Cemu/cafeLibs/snduser2.rpl",111360,"bios"],["Cemu/cafeLibs/swkbd.rpl",1116288,"bios"],["Cemu/keys.txt",449507,"bios"],["Cemu/mlc01/sys/title/0005001b/10042400/content/CafeCn.ttf",13110604,"bios"],["Cemu/mlc01/sys/title/0005001b/10042400/content/CafeKr.ttf",2260660,"bios"],["Cemu/mlc01/sys/title/0005001b/10042400/content/CafeStd.ttf",2442464,"bios"],["Cemu/mlc01/sys/title/0005001b/10042400/content/CafeTw.ttf",8229724,"bios"],["Cemu/mlc01/sys/title/0005001b/1004f000/content/00/swkbd/swkbd.pack",1907900,"bios"],["Cemu/mlc01/sys/title/0005001b/10051000/content/00/erreula/erreula.pack",1252759,"bios"],["Cemu/mlc01/sys/title/0005001b/10054000/content/ccerts/WIIU_ACCOUNT_1_CERT.der",1226,"bios"],["Cemu/mlc01/sys/title/0005001b/10054000/content/ccerts/WIIU_ACCOUNT_1_RSA_KEY.aes",1200,"bios"],["Cemu/mlc01/sys/title/0005001b/10054000/content/ccerts/WIIU_COMMON_1_CERT.der",1224,"bios"],["Cemu/mlc01/sys/title/0005001b/10054000/content/ccerts/WIIU_COMMON_1_RSA_KEY.aes",1200,"bios"],["Cemu/mlc01/sys/title/0005001b/10054000/content/ccerts/WIIU_OLIVE_1_CERT.der",1224,"bios"],["Cemu/mlc01/sys/title/0005001b/10054000/content/ccerts/WIIU_OLIVE_1_RSA_KEY.aes",1200,"bios"],["Cemu/mlc01/sys/title/0005001b/10054000/content/ccerts/WIIU_VINO_1_CERT.der",1223,"bios"],["Cemu/mlc01/sys/title/0005001b/10054000/content/ccerts/WIIU_VINO_1_RSA_KEY.aes",1200,"bios"],["Cemu/mlc01/sys/title/0005001b/10054000/content/ccerts/WIIU_WOOD_1_CERT.der",1223,"bios"],["Cemu/mlc01/sys/title/0005001b/10054000/content/ccerts/WIIU_WOOD_1_RSA_KEY.aes",1200,"bios"],["Cemu/mlc01/sys/title/0005001b/10054000/content/scerts/ADDTRUST_EXT_CA_ROOT.der",1082,"bios"],["Cemu/mlc01/sys/title/0005001b/10054000/content/scerts/BALTIMORE_CYBERTRUST_ROOT_CA.der",891,"bios"],["Cemu/mlc01/sys/title/0005001b/10054000/content/scerts/CACERT_NINTENDO_CA.der",897,"bios"],["Cemu/mlc01/sys/title/0005001b/10054000/content/scerts/CACERT_NINTENDO_CA_G2.der",1173,"bios"],["Cemu/mlc01/sys/title/0005001b/10054000/content/scerts/CACERT_NINTENDO_CA_G3.der",1060,"bios"],["Cemu/mlc01/sys/title/0005001b/10054000/content/scerts/CACERT_NINTENDO_CLASS2_CA.der",924,"bios"],["Cemu/mlc01/sys/title/0005001b/10054000/content/scerts/CACERT_NINTENDO_CLASS2_CA_G2.der",1200,"bios"],["Cemu/mlc01/sys/title/0005001b/10054000/content/scerts/CACERT_NINTENDO_CLASS2_CA_G3.der",1200,"bios"],["Cemu/mlc01/sys/title/0005001b/10054000/content/scerts/COMODO_CA.der",980,"bios"],["Cemu/mlc01/sys/title/0005001b/10054000/content/scerts/CYBERTRUST_GLOBAL_ROOT_CA.der",933,"bios"],["Cemu/mlc01/sys/title/0005001b/10054000/content/scerts/DIGICERT_ASSURED_ID_ROOT_CA.der",955,"bios"],["Cemu/mlc01/sys/title/0005001b/10054000/content/scerts/DIGICERT_ASSURED_ID_ROOT_CA_G2.der",922,"bios"],["Cemu/mlc01/sys/title/0005001b/10054000/content/scerts/DIGICERT_GLOBAL_ROOT_CA.der",947,"bios"],["Cemu/mlc01/sys/title/0005001b/10054000/content/scerts/DIGICERT_GLOBAL_ROOT_CA_G2.der",914,"bios"],["Cemu/mlc01/sys/title/0005001b/10054000/content/scerts/DIGICERT_HIGH_ASSURANCE_EV_ROOT_CA.der",969,"bios"],["Cemu/mlc01/sys/title/0005001b/10054000/content/scerts/ENTRUST_CA_2048.der",1070,"bios"],["Cemu/mlc01/sys/title/0005001b/10054000/content/scerts/ENTRUST_ROOT_CA.der",1173,"bios"],["Cemu/mlc01/sys/title/0005001b/10054000/content/scerts/ENTRUST_ROOT_CA_G2.der",1090,"bios"],["Cemu/mlc01/sys/title/0005001b/10054000/content/scerts/ENTRUST_SECURE_SERVER_CA.der",1244,"bios"],["Cemu/mlc01/sys/title/0005001b/10054000/content/scerLine truncated
+1 -1
View File
@@ -1 +1 @@
{"arcade":{"fbneo":{"file":"arcade/fbneo.json","gzip_size":115955,"sha256":"88961c9a6be804772baa767f6ee3a9162478c30c60fe55c8363d8fe4fbc909da","size":423362},"flycast":{"file":"arcade/flycast.json","gzip_size":1841,"sha256":"957189a6e993fda08e21c90ffc6ad94aed9ca9e6dd9ed8c7724e29db036791cb","size":5441},"mame":{"file":"arcade/mame.json","gzip_size":154527,"sha256":"b12010301293a218ecfac45706d81a26c3ac0c27eebeca7409bc8f6ce0163e9e","size":604648},"mame0258":{"file":"arcade/mame0258.json","gzip_size":141151,"sha256":"7ecff1979ed2ac123ea3ba4825dde6e2c31906415165fabefc9af93fa48a6de4","size":556059},"mame0278":{"file":"arcade/mame0278.json","gzip_size":148595,"sha256":"7881e3516f451ec83e886aaf41ebac9d60f497e1f954f49749d52890d7955cbf","size":582797},"mame2000":{"file":"arcade/mame2000.json","gzip_size":8624,"sha256":"f0d69b0872ecfc2845eeb7304543e5b17c11db82060b5514c206b6962ed08263","size":23316},"mame2003":{"file":"arcade/mame2003.json","gzip_size":17456,"sha256":"3b44e2a92c80a8f104b7781fcc1c776d025ad2cf4986638efa3ea041baa9a56d","size":48929},"mame2003_plus":{"file":"arcade/mame2003_plus.json","gzip_size":21077,"sha256":"2857283556fa49c20d8160ed113465bf0c2e643ed0b8acd2d38266a78be8e25e","size":62373},"mame2010":{"file":"arcade/mame2010.json","gzip_size":30869,"sha256":"50b1b381b4b07463f69f1f4c512dd1c98a78d4d0e9c3aeaf49b7b1b007b42152","size":96528},"mame2015":{"file":"arcade/mame2015.json","gzip_size":86990,"sha256":"afeb8c32f651421f74c6de057b0c0b837acd14c533b5160bb31f4411e0afffec","size":360117},"mame2016":{"file":"arcade/mame2016.json","gzip_size":101249,"sha256":"1f75147977d9d082a38b8f8e47a02b301f3d6e6db97c9b9282f3e7f27f26ee47","size":406190}},"containers":{"7z":{"description":"Per-file CRCs and sizes sit in the header at the end of the archive, LZMA-compressed by default (kEncodedHeader). One LZMA decode of the header, independent of the archive size, gives them. Python's lzma is an optional module.","re_read":true,"signature":{"bytes_hex":"377abcaf271c","offset":0},"source_ref":"ip7z/7zip@b88c6bc0 DOC/7zFormat.txt:171-189, DOC/7zFormat.txt:318-334, CPP/7zip/Archive/7z/7zHandlerOut.cpp:859"},"cd-sector":{"description":"User data of a CD sector. In a 2048-byte image (.iso) sector N starts at N * 2048. In a raw 2352-byte image it starts at N * 2352 plus 16 for Mode 1 and plus 24 for Mode 2 Form 1 (12 sync bytes, a 4-byte header, and for Mode 2 an 8-byte subheader).","re_read":true,"sector_size":{"iso":2048,"raw":2352},"source_ref":"stenzek/duckstation@526b4a12 src/util/iso_reader.cpp:157-171, src/util/cd_image.h:28-34","user_data_offset":{"mode1":16,"mode2":24}},"chd-v5":{"description":"MAME compressed hunks, big-endian. The header holds sizes, codecs and hashes only, never the system or the region. The overall SHA-1 is what MAME software lists record. Neither SHA-1 equals a Redump track hash: chdman hashes 2448-byte frames (subcode included, zero-filled), pads each track to 4 frames and byte-swaps audio, all tracks in one stream.","fields":{"compressors":{"encoding":"fourcc4","length":16,"offset":16},"header_length":{"encoding":"u32be","length":4,"offset":8,"value":124},"hunk_bytes":{"encoding":"u32be","length":4,"offset":56},"logical_bytes":{"encoding":"u64be","length":8,"offset":32},"map_offset":{"encoding":"u64be","length":8,"offset":40},"metadata_offset":{"encoding":"u64be","length":8,"offset":48},"overall_sha1":{"encoding":"hex","length":20,"offset":84},"parent_sha1":{"encoding":"hex","length":20,"offset":104},"raw_sha1":{"encoding":"hex","length":20,"offset":64},"unit_bytes":{"encoding":"u32be","length":4,"offset":60},"version":{"encoding":"u32be","length":4,"offset":12,"value":5}},"magic":{"bytes":"MComprHD","offset":0},"media_tags":{"CHCD":"cd","CHGD":"gd-rom","CHGT":"gd-rom","CHT2":"cd","CHTR":"cd","DVD ":"dvd","GDDD":"hard-disk"},"metadata_entry":{"description":"16-byte entry header, payload follows. Linked list from metadata_offset.","flags":{"encoding":"u8","length":1,"offset":4},"length":{"encoding":"u24be","length":3,"offset":5},"next":{"encoding":"u64be","length":8,"offset":8},"tag":{"encoding":"ascii","length":4,"offset":0}},"re_read":true,"source_ref":"mamedev/mame@f34f0250 src/lib/util/chd.h:148-162, src/lib/util/chd.cpp:2021-2061, src/lib/util/chd.cpp:2822-2831, src/lib/util/chd.h:212-235, src/lib/util/chd.cpp:1709-1749, src/tools/chdman.cpp:443-445, src/tools/chdman.cpp:2195-2203, src/lib/util/cdrom.cpp:2669-2672, src/emu/romload.cpp:1211"},"gamecube-disc":{"description":"Where disc offset 0 sits inside each container Dolphin opens.","formats":{"ciso":{"disc_header_at":32768,"magic":"CISO"},"gcz":{"disc_header_at":null,"magic_u32le":2970337281,"note":"block 0 is zlib unless bit 63 of its pointer is set"},"iso":{"disc_header_at":0,"magic":null},"rvz":{"disc_header_at":88,"magic":"RVZ\u0001","note":"first 0x80 disc bytes copied into header 2"},"wbfs":{"disc_header_at":null,"magic":"WBFS","note":"disc offset 0 at wlba[0] << wbfs_sector_shift"},"wia":{"disc_header_at":88,"magic":"WIA\u0001","note":Line truncated
{"arcade":{"fbneo":{"file":"arcade/fbneo.json","gzip_size":115955,"sha256":"88961c9a6be804772baa767f6ee3a9162478c30c60fe55c8363d8fe4fbc909da","size":423362},"flycast":{"file":"arcade/flycast.json","gzip_size":1841,"sha256":"957189a6e993fda08e21c90ffc6ad94aed9ca9e6dd9ed8c7724e29db036791cb","size":5441},"mame":{"file":"arcade/mame.json","gzip_size":154527,"sha256":"b12010301293a218ecfac45706d81a26c3ac0c27eebeca7409bc8f6ce0163e9e","size":604648},"mame0258":{"file":"arcade/mame0258.json","gzip_size":141151,"sha256":"7ecff1979ed2ac123ea3ba4825dde6e2c31906415165fabefc9af93fa48a6de4","size":556059},"mame0278":{"file":"arcade/mame0278.json","gzip_size":148595,"sha256":"7881e3516f451ec83e886aaf41ebac9d60f497e1f954f49749d52890d7955cbf","size":582797},"mame2000":{"file":"arcade/mame2000.json","gzip_size":8624,"sha256":"f0d69b0872ecfc2845eeb7304543e5b17c11db82060b5514c206b6962ed08263","size":23316},"mame2003":{"file":"arcade/mame2003.json","gzip_size":17456,"sha256":"3b44e2a92c80a8f104b7781fcc1c776d025ad2cf4986638efa3ea041baa9a56d","size":48929},"mame2003_plus":{"file":"arcade/mame2003_plus.json","gzip_size":21077,"sha256":"2857283556fa49c20d8160ed113465bf0c2e643ed0b8acd2d38266a78be8e25e","size":62373},"mame2010":{"file":"arcade/mame2010.json","gzip_size":30869,"sha256":"50b1b381b4b07463f69f1f4c512dd1c98a78d4d0e9c3aeaf49b7b1b007b42152","size":96528},"mame2015":{"file":"arcade/mame2015.json","gzip_size":86990,"sha256":"afeb8c32f651421f74c6de057b0c0b837acd14c533b5160bb31f4411e0afffec","size":360117},"mame2016":{"file":"arcade/mame2016.json","gzip_size":101249,"sha256":"1f75147977d9d082a38b8f8e47a02b301f3d6e6db97c9b9282f3e7f27f26ee47","size":406190}},"containers":{"7z":{"description":"Per-file CRCs and sizes sit in the header at the end of the archive, LZMA-compressed by default (kEncodedHeader). One LZMA decode of the header, independent of the archive size, gives them. Python's lzma is an optional module.","re_read":true,"signature":{"bytes_hex":"377abcaf271c","offset":0},"source_ref":"ip7z/7zip@b88c6bc0 DOC/7zFormat.txt:171-189, DOC/7zFormat.txt:318-334, CPP/7zip/Archive/7z/7zHandlerOut.cpp:859"},"cd-sector":{"description":"User data of a CD sector. In a 2048-byte image (.iso) sector N starts at N * 2048. In a raw 2352-byte image it starts at N * 2352 plus 16 for Mode 1 and plus 24 for Mode 2 Form 1 (12 sync bytes, a 4-byte header, and for Mode 2 an 8-byte subheader).","re_read":true,"sector_size":{"iso":2048,"raw":2352},"source_ref":"stenzek/duckstation@526b4a12 src/util/iso_reader.cpp:157-171, src/util/cd_image.h:28-34","user_data_offset":{"mode1":16,"mode2":24}},"chd-v5":{"description":"MAME compressed hunks, big-endian. The header holds sizes, codecs and hashes only, never the system or the region. The overall SHA-1 is what MAME software lists record. Neither SHA-1 equals a Redump track hash: chdman hashes 2448-byte frames (subcode included, zero-filled), pads each track to 4 frames and byte-swaps audio, all tracks in one stream.","fields":{"compressors":{"encoding":"fourcc4","length":16,"offset":16},"header_length":{"encoding":"u32be","length":4,"offset":8,"value":124},"hunk_bytes":{"encoding":"u32be","length":4,"offset":56},"logical_bytes":{"encoding":"u64be","length":8,"offset":32},"map_offset":{"encoding":"u64be","length":8,"offset":40},"metadata_offset":{"encoding":"u64be","length":8,"offset":48},"overall_sha1":{"encoding":"hex","length":20,"offset":84},"parent_sha1":{"encoding":"hex","length":20,"offset":104},"raw_sha1":{"encoding":"hex","length":20,"offset":64},"unit_bytes":{"encoding":"u32be","length":4,"offset":60},"version":{"encoding":"u32be","length":4,"offset":12,"value":5}},"magic":{"bytes":"MComprHD","offset":0},"media_tags":{"CHCD":"cd","CHGD":"gd-rom","CHGT":"gd-rom","CHT2":"cd","CHTR":"cd","DVD ":"dvd","GDDD":"hard-disk"},"metadata_entry":{"description":"16-byte entry header, payload follows. Linked list from metadata_offset.","flags":{"encoding":"u8","length":1,"offset":4},"length":{"encoding":"u24be","length":3,"offset":5},"next":{"encoding":"u64be","length":8,"offset":8},"tag":{"encoding":"ascii","length":4,"offset":0}},"re_read":true,"source_ref":"mamedev/mame@f34f0250 src/lib/util/chd.h:148-162, src/lib/util/chd.cpp:2021-2061, src/lib/util/chd.cpp:2822-2831, src/lib/util/chd.h:212-235, src/lib/util/chd.cpp:1709-1749, src/tools/chdman.cpp:443-445, src/tools/chdman.cpp:2195-2203, src/lib/util/cdrom.cpp:2669-2672, src/emu/romload.cpp:1211"},"gamecube-disc":{"description":"Where disc offset 0 sits inside each container Dolphin opens.","formats":{"ciso":{"disc_header_at":32768,"magic":"CISO"},"gcz":{"disc_header_at":null,"magic_u32le":2970337281,"note":"block 0 is zlib unless bit 63 of its pointer is set"},"iso":{"disc_header_at":0,"magic":null},"rvz":{"disc_header_at":88,"magic":"RVZ\u0001","note":"first 0x80 disc bytes copied into header 2"},"wbfs":{"disc_header_at":null,"magic":"WBFS","note":"disc offset 0 at wlba[0] << wbfs_sector_shift"},"wia":{"disc_header_at":88,"magic":"WIA\u0001","note":Line truncated
+55 -3
View File
@@ -610,16 +610,60 @@ def print_coverage(coverage: dict, files: dict[Path, str]) -> None:
print(f"{len(files)} files, {raw:,} bytes, {packed:,} bytes gzip")
def _sample(items: list[str], limit: int = 3) -> str:
shown = ", ".join(items[:limit])
return f"{shown}, +{len(items) - limit} more" if len(items) > limit else shown
def describe_change(old: str | None, new: str) -> list[str]:
"""What differs between a published document and the one render() makes.
The documents are single-line JSON of up to 550 KB: STALE alone left a
diff by hand to find that a manifest gained one file."""
if old is None:
return ["not written yet"]
try:
before, after = json.loads(old), json.loads(new)
except ValueError:
return ["the published file is not valid JSON"]
if not (isinstance(before, dict) and isinstance(after, dict)):
return ["document changed"]
parts = []
for key in sorted(set(before) | set(after)):
a, b = before.get(key), after.get(key)
if a == b:
continue
if isinstance(a, list) and isinstance(b, list):
olds = {json.dumps(x, sort_keys=True) for x in a}
news = {json.dumps(x, sort_keys=True) for x in b}
added = sorted(news - olds)
removed = sorted(olds - news)
change = []
if added:
change.append(f"{len(added)} added ({_sample(added)})")
if removed:
change.append(f"{len(removed)} removed ({_sample(removed)})")
parts.append(f"{key}: {', '.join(change) or 'reordered'}")
elif isinstance(a, dict) and isinstance(b, dict):
changed = sorted(k for k in set(a) | set(b) if a.get(k) != b.get(k))
parts.append(f"{key}: {len(changed)} changed ({_sample(changed)})")
else:
parts.append(f"{key} changed" if key in before and key in after
else f"{key} {'added' if key in after else 'removed'}")
return parts or ["formatting changed"]
def main() -> int:
parser = argparse.ArgumentParser(allow_abbrev=False, description=__doc__.splitlines()[0])
parser.add_argument("--output-dir", type=Path, default=OUTPUT,
help=f"where the index is written (default {OUTPUT})")
parser.add_argument("--check", action="store_true", help="exit 1 when a file would change")
parser.add_argument("--check", action="store_true",
help="exit 1 when a file would change, naming what differs (implies --quiet)")
parser.add_argument("--quiet", action="store_true", help="print only failures")
args = parser.parse_args()
files, coverage = render(args.output_dir)
if not args.quiet:
if not (args.quiet or args.check):
print_coverage(coverage, files)
failures = floor_failures(coverage)
for failure in failures:
@@ -629,8 +673,16 @@ def main() -> int:
) if args.output_dir.is_dir() else []
changed = [p for p, t in files.items() if not p.exists() or p.read_text(encoding="utf-8") != t]
if args.check:
for path in changed + stale:
for path in changed:
print(f"STALE {path}", file=sys.stderr)
current = path.read_text(encoding="utf-8") if path.exists() else None
for line in describe_change(current, files[path]):
print(f" {line}", file=sys.stderr)
for path in stale:
print(f"STALE {path}", file=sys.stderr)
print(" no longer generated", file=sys.stderr)
if changed or stale:
print("Run python scripts/generate_games_index.py to write them.", file=sys.stderr)
return 1 if changed or stale or failures else 0
for path in stale:
path.unlink()
+41
View File
@@ -176,6 +176,47 @@ class GamesIndexFixture(unittest.TestCase):
self.assertTrue(any("catalog" in f for f in failures))
class CheckSaysWhatDiffers(unittest.TestCase):
"""--check printed STALE and a path after 120 lines of coverage: the
reader had to diff single-line JSON of 550 KB by hand to find that a
manifest had gained one file."""
def test_an_added_file_is_named(self) -> None:
old = json.dumps({"files": [["a.bin", 1, "bios"]], "version": 1})
new = json.dumps({"files": [["a.bin", 1, "bios"], ["ide12.rom", 16384, "bios"]],
"version": 1})
lines = gi.describe_change(old, new)
self.assertEqual(len(lines), 1)
self.assertIn("1 added", lines[0])
self.assertIn("ide12.rom", lines[0])
def test_new_and_unreadable_documents(self) -> None:
self.assertEqual(gi.describe_change(None, "{}"), ["not written yet"])
self.assertIn("not valid JSON", gi.describe_change("{", "{}")[0])
def test_check_names_the_command_and_skips_coverage(self) -> None:
import contextlib
import io
from unittest import mock
with tempfile.TemporaryDirectory() as tmp:
out = Path(tmp)
target = out / "index.json"
target.write_text(json.dumps({"files": []}), encoding="utf-8")
files = {target: json.dumps({"files": [["x.rom", 2, "bios"]]})}
coverage = {"setups": {}, "systems": {}, "arcade": []}
stdout, stderr = io.StringIO(), io.StringIO()
argv = ["generate_games_index.py", "--check", "--output-dir", tmp]
with mock.patch.object(gi, "render", return_value=(files, coverage)), \
mock.patch.object(sys, "argv", argv), \
contextlib.redirect_stdout(stdout), contextlib.redirect_stderr(stderr):
code = gi.main()
self.assertEqual(code, 1)
self.assertEqual(stdout.getvalue(), "")
self.assertIn("files: 1 added", stderr.getvalue())
self.assertIn("python scripts/generate_games_index.py", stderr.getvalue())
class CommittedData(unittest.TestCase):
"""The data the repository publishes."""