[PATCH setup v2] Query the user if a corrupt local file is found
Ken Brown
kbrown@cornell.edu
Wed Jan 10 02:52:00 GMT 2018
On 1/9/2018 5:25 PM, Ken Brown wrote:
> Also reorganize package validation.
>
> Move the size-validation code in download.cc and the hash-validation
> code in install.cc into new member functions of the packagesource
> class. Add a bool member 'validated' to the class to make sure that
> the checking is done only once.
>
> Change download.cc:check_for_cached() so that it offers to delete a
> corrupt package file instead of throwing an exception. The latter
> previously caused a fatal error when check_for_cached() was called
> from do_download_thread and download_one. Now we get a fatal error
> only if the user chooses not to delete the file.
>
> Also make check_for_cached() check the hash of the file in addition to
> the size. Similarly, check the hash in addition to the size after
> downloading a file.
I missed 'pkgsource.set_cached ("")' in a couple places. v3 is on the way.
Ken
More information about the Cygwin-apps
mailing list