Make the pack
command produce a predictable image file from the same content source.
#101
Labels
pack
command produce a predictable image file from the same content source.
#101
Currently, running the pack command using a image file as input will produce different image files on subsequent runs, although the image content hash produced with
xdvdfs checksum
always matches.Using
Halo
as an example we get this:If we have a raw dump that matches the redump databse as
Halo - Combat Evolved (USA).iso
the image hash will be
b8fda9630d1098cfcb46a59cab7e92031bede480661e7ee9f3a23f99dd711c74
Re-packing it with
xdvdfs pack
will shrink the image as expected, and you will get this:Halo - Combat Evolved (USA).xiso.iso 50d6513db22cf50628c984637fcd9d6184b5ae37b5833f3249751cd155869024
However, if you run
pack
again using this file as input a different file will be produced.Halo - Combat Evolved (USA).xiso.xiso.iso fc448a6f944161f6bb71a2b1a21b727c5836495973de83e034de11e9cdc8c28c
In all cases the content hash is
1f9e0b64febe43b397b0a9b2bec682f9dac9aac48c10530432141054742cbe7a
Ideally, running
pack
on an iso more that once will not produce a different file provided the same version of xdvdfs is used and the image generation logic has not changed.This is useful because ideally we don't want the output file to change if the pack process ends up being run more than once for whatever reason unless something actually changed. (e.g. you might run a script to repack a directory of mixed images)
Comparing the images it seems things end up in a different order. I have not looked into it but perhaps this can be solved by sorting something somewhere?
The text was updated successfully, but these errors were encountered: