What to do about setup's poor handling of disk full conditions

Christopher Faylor cgf-use-the-mailinglist-please@cygwin.com
Sun Jun 30 17:00:00 GMT 2013

On Sun, Jun 30, 2013 at 11:45:24AM +0200, Corinna Vinschen wrote:
>On Jun 29 16:33, Christopher Faylor wrote:
>> I keep cygwin on a partition which is relatively small.  So, today for
>> at least the third time, I've run into problems where setup was unable
>> to extract files because I'd run out of disk space (I had started to
>> install the 64-bit installation on the same disk, thought better of it,
>> and forgotten to clean up after myself).  The errors represented as
>> in-use problems.  That was clearly wrong.  I thought there was a setup
>> bug because it seemed to allow me to continue without error.  It didn't
>> really.  I kept continuing until eventually setup came to a hard stop
>> and my installation was hosed.
>> What should setup do when it encounters a full disk?  I think it should
>> probably give the user the option of freeing up disk space and
>> continuing but I think that's going to be difficult to do cleanly since
>> there are any number of places where you could run into this situation.
>> Does anyone have any creative ideas about how to allow setup.exe to
>> cleanly handle out-of-disk-space errors?
>I don't see a simple way out, unless you make the installation
>process transactional as under yum.
>One simple way to handle that would be to add up the bytes of
>the packages to install (blocksize aligned) and to compare that
>with the number of bytes left on the disk.
>One even more easy way would be to show a warning every time the
>available disk space is less then 1 Gig.

I think I was actually seeing the error on directory creation so
just adding up space wouldn't necessarily be sufficient.

I was actually thinking of having some kind of exception when any file
I/O operation encounters an ERROR_DISK_FULL (or whatever it is).  But, I
guess, if you are going to code that then you can just put a standard
check_for_disk_full() call after every operation.

More information about the Cygwin-apps mailing list