Disallow installing app if not enough free space
I'm working on a specialized deployment of GNOME to machines with very small disks. These deployments need GNOME Software to manage updates to existing apps, but the disk won't have enough space to install anything but the smallest of additional apps. Right now, GNOME Software shows the install button but does not proactively warn when an app will not be able to be installed (e.g. its size plus dependencies are larger than the available space). This causes data to be downloaded which is ultimately thrown away—costly when using metered data!
Download Size | Error |
---|---|
Proposal
Much like #59 (closed), but for apps instead of OS upgrades. I would recommend making the install button insensitive with a message (below, like how status is shown) that there is not enough space to install this app.
To reproduce
For testing, you can make a GNOME OS VM in GNOME Boxes with a 5 GiB disk size, then attempt to install a large app like 0 A.D.
Notes
It seems the listed Download size + "Required Dependencies" does not add up to the required space reported when installing some apps. As a start, this behavior could exist just for apps where that download size + dependencies does outweigh the available free space, but the additional free space required by Flatpak ideally would be taken into account as well.
Download Size | Error |
---|---|