summaryrefslogtreecommitdiff
path: root/cmdline
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2009-12-10 20:48:36 +0100
committerMichael Vogt <michael.vogt@ubuntu.com>2009-12-10 20:48:36 +0100
commit3e2f480d7ad43f565bf2253fc598c2b80a22560f (patch)
tree9328c276084c60db8bcea258b35c9d69e9da4a3b /cmdline
parentfb3dc57975989a6514577569af9171732b7c5403 (diff)
parent944b2fffc4a54fbf9329faa579592cc758915a99 (diff)
merged -r1887..1901 from lp:~donkult/apt/sid
Diffstat (limited to 'cmdline')
-rw-r--r--cmdline/apt-get.cc24
1 files changed, 16 insertions, 8 deletions
diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc
index b9f936420..52e90fc64 100644
--- a/cmdline/apt-get.cc
+++ b/cmdline/apt-get.cc
@@ -862,10 +862,14 @@ bool InstallPackages(CacheFile &Cache,bool ShwKept,bool Ask = true,
{
struct statvfs Buf;
string OutputDir = _config->FindDir("Dir::Cache::Archives");
- if (statvfs(OutputDir.c_str(),&Buf) != 0)
- return _error->Errno("statvfs",_("Couldn't determine free space in %s"),
- OutputDir.c_str());
- if (unsigned(Buf.f_bfree) < (FetchBytes - FetchPBytes)/Buf.f_bsize)
+ if (statvfs(OutputDir.c_str(),&Buf) != 0) {
+ if (errno == EOVERFLOW)
+ return _error->WarningE("statvfs",_("Couldn't determine free space in %s"),
+ OutputDir.c_str());
+ else
+ return _error->Errno("statvfs",_("Couldn't determine free space in %s"),
+ OutputDir.c_str());
+ } else if (unsigned(Buf.f_bfree) < (FetchBytes - FetchPBytes)/Buf.f_bsize)
{
struct statfs Stat;
if (statfs(OutputDir.c_str(),&Stat) != 0
@@ -2240,10 +2244,14 @@ bool DoSource(CommandLine &CmdL)
// Check for enough free space
struct statvfs Buf;
string OutputDir = ".";
- if (statvfs(OutputDir.c_str(),&Buf) != 0)
- return _error->Errno("statvfs",_("Couldn't determine free space in %s"),
- OutputDir.c_str());
- if (unsigned(Buf.f_bfree) < (FetchBytes - FetchPBytes)/Buf.f_bsize)
+ if (statvfs(OutputDir.c_str(),&Buf) != 0) {
+ if (errno == EOVERFLOW)
+ return _error->WarningE("statvfs",_("Couldn't determine free space in %s"),
+ OutputDir.c_str());
+ else
+ return _error->Errno("statvfs",_("Couldn't determine free space in %s"),
+ OutputDir.c_str());
+ } else if (unsigned(Buf.f_bfree) < (FetchBytes - FetchPBytes)/Buf.f_bsize)
{
struct statfs Stat;
if (statfs(OutputDir.c_str(),&Stat) != 0