1) rather than assuming that the on-disk mirror is self-consistent and all files listed in Packages et al do exist, verify that they do at least exist with the right size
2) add a --repair option that also re-verifies that the existing file sha256 sums match those listed in the existing Packages
The background here is that due to external issues (not the fault of raspmirror) our mirror became inconsistent, with some package files that should be present per Packages actually being missing. raspbmirror in subsequent runs never noticed the problem and it took a while to work out why it would not download the missing files to fix the mirror state. Testing for existence/size is cheap and should help with this sort of case.
--repair is extra paranoia to guard against more subtle corruption.
This makes two changes:
1) rather than assuming that the on-disk mirror is self-consistent and all files listed in Packages et al do exist, verify that they do at least exist with the right size
2) add a
--repair
option that also re-verifies that the existing file sha256 sums match those listed in the existing PackagesThe background here is that due to external issues (not the fault of raspmirror) our mirror became inconsistent, with some package files that should be present per Packages actually being missing. raspbmirror in subsequent runs never noticed the problem and it took a while to work out why it would not download the missing files to fix the mirror state. Testing for existence/size is cheap and should help with this sort of case.
--repair
is extra paranoia to guard against more subtle corruption.