Bug#247331: apt: free disk space check is not useful
Package: apt
Version: 0.5.24
Severity: minor
Tags: sid
This free disk space check is not useful. I think it should be removed.
It has happened to me that I have filled the partition post this check
was done with an unsuccessful installation and freed some space after
the check was supposed to be done with a successful installation.
Both dpkg and apt should neither corrupt the databases not keep the
system in an inconsistent state on disk full condition.
Just checking free disk space at start is not a solution.
--- apt-old/cmdline/apt-get.cc
+++ apt/cmdline/apt-get.cc
@@ -1862,10 +1862,11 @@
if (statvfs(OutputDir.c_str(),&Buf) != 0)
return _error->Errno("statvfs","Couldn't determine free space in %s",
OutputDir.c_str());
+#ifdef CONFIG_CHECKFREESPACE
if (unsigned(Buf.f_bfree) < (FetchBytes - FetchPBytes)/Buf.f_bsize)
return _error->Error(_("You don't have enough free space in %s"),
OutputDir.c_str());
-
+#endif
// Number of bytes
if (DebBytes != FetchBytes)
ioprintf(c1out,_("Need to get %sB/%sB of source archives.\n"),
Reply to: