On Thu, Jul 07, 2022 at 11:30:54AM +0200, intrigeri wrote: > Package: apt > Version: 2.5.1 > Severity: wishlist > > Hi, > > On a system with a very simple partition layout (/boot and /), > with 2GB available on the root filesystem, APT lets me try to > install packages that will fill the filesystem: > > 0 upgraded, 355 newly installed, 0 to remove and 0 not upgraded. > Need to get 1,209 MB of archives. > After this operation, 4,646 MB of additional disk space will be used. > Do you want to continue? [Y/n] > > This operation later fails when dpkg unpacks packages. > > It would be sweet if APT could identify this foreseeable failure > and error out or ask for a specific confirmation. > It would be even sweeter if this was implemented in a way > that frontends such as GNOME Software and Synaptic can present > this information to the user in a usable manner. > > I understand this may not be easy to implement, because APT would need > to know on which filesystems the additional space will be used, > and that information is not available in Installed-Size.
My plan is to assume that Installed-Size is close enough to "size in /usr", and just compare that with free space in /usr with like a 100MB padding. This does not work for kernels which install in /boot, and if anything were to install stuff to /opt or /var and they are on a different FS; but it should be correct for most packages on a supported (usrmerged) system. -- debian developer - deb.li/jak | jak-linux.org - free software dev ubuntu core developer i speak de, en