[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1079512: apt: Apt should decline to install if disk space is way too low



Control: severity -1 wishlist
Control: retitle -1 apt: apt-get could have disk space warnings too

On Sat, Aug 24, 2024 at 07:36:34AM GMT, Helge Kreutzmann wrote:
> Package: apt
> Version: 2.9.8
> Severity: important
> 
> I just did the usual 
> apt-get update
> apt-get dist-upgrade
> 
> Apt-listchanges showed me the changes and I let apt continue. Then the
> installation failed because disk space was too low. I could not
> continue using apt to fix this (hence severity important), but I had
> to manually move parts of /usr to other places until I could finish
> the "dist-upgrade". 
> 
> It turned out that I had to move ~ 1 GB (!) until this was the case.
> 
> I really wonder why apt cannot detect that such a big chunk of space is 
> missing and then would refuse to start the installation. (I initially
> believed it was just off a few MB.)

*apt* since 2.9.1, in the new user interface, informs you about the space
usage required and displays a very prominent warning, defaults the prompt
to N, and changes it to

    Continue anyway?

instead of

    Continue?

If the install size * 1.1 >= available space (not even free space).

I suggest you use it.

*apt-get* is a legacy interfacing for scripting purposes with the
utmost importance awarded to not changing behavior, as such the
full change seems out of scope for it.

I anticipate the warning will also migrate into the legacy interface,
it seems reasonable we can enable it in apt-get too. However, what
we can't do is change the prompt default to N, or change the prompt
text for it.

This isn't the only absurd behavior it has; it also will fall back
to treating an argument containing . or + as an unanchored regular
expression, so apt remove g++ if we were to remove g++ would remove
any package containing g in the name.

Going forward we will have stable interface versions you can request
from the apt(8) interface, negating the need to use the legacy dangerous
apt-get command which should then start beginning issuing its own
deprecation messages perhaps such that we can get rid of it in maybe
2030 or 2035.

-- 
debian developer - deb.li/jak | jak-linux.org - free software dev
ubuntu core developer                              i speak de, en

Attachment: signature.asc
Description: PGP signature


Reply to: