]> git.saurik.com Git - apt.git/blobdiff - cmdline/apt-get.cc
merge my rred-rewrite branch & add it's changes to the changelog
[apt.git] / cmdline / apt-get.cc
index ca14f4c2bbc459d17690e47cc19d89ce1045ceda..49fde746682fcdf357ea0ad42c5f7b5cee295e05 100644 (file)
@@ -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
@@ -2228,10 +2232,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