]> git.saurik.com Git - apt.git/blobdiff - cmdline/apt-get.cc
merged -r 1923..1926 from lp:~donkult/apt/sid
[apt.git] / cmdline / apt-get.cc
index b9f9364208f0f0ac4b88b5d8e914d5d0941ea2d6..f84c82d283d1de099c0b27d8fa8bed9f8a3b571f 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
@@ -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
@@ -2803,6 +2811,7 @@ int main(int argc,const char *argv[])                                     /*{{{*/
       {0,"force-yes","APT::Get::force-yes",0},
       {0,"print-uris","APT::Get::Print-URIs",0},
       {0,"diff-only","APT::Get::Diff-Only",0},
+      {0,"debian-only","APT::Get::Diff-Only",0},
       {0,"tar-only","APT::Get::Tar-Only",0},
       {0,"dsc-only","APT::Get::Dsc-Only",0},
       {0,"purge","APT::Get::Purge",0},