libdnf icon indicating copy to clipboard operation
libdnf copied to clipboard

Check free disk space

Open tpgxyz opened this issue 6 years ago • 1 comments

I had to update lots of packages, which was about to 1 GiB of downloaded files. Unfortunately during rpm upgrade, process failed due to run out of free disk space. I have feeling that dnf does not take into count unpackaged size of rpms. Anyways in case when downloaded rpm + unpackaged size of rpm is close to available free disk space, a dnf should not allow to upgrade system with a message for user.

tpgxyz avatar Nov 08 '18 11:11 tpgxyz

dnf_transaction_check_free_space() doesn't seems to have any check for 'real_size_on disk' so calcualtion is wrong and we hit later disk full.

download_size = rpm_download_size in this function..

So let say we have 100MB free space and install 99MB in rpm size package.

now the free_space vs downlaod_size check passes however we are now with 1MB left trying to install something will be >99MB unpacked on disk.

100MB-99MB_RPM_size( rpm go to cache ) = 1MB real free space left ..

abucodonosor avatar Nov 08 '18 12:11 abucodonosor