]> git.saurik.com Git - apt.git/commitdiff
* only show ETA if that makes sense
authorMichael Vogt <michael.vogt@ubuntu.com>
Tue, 28 Mar 2006 17:05:42 +0000 (19:05 +0200)
committerMichael Vogt <michael.vogt@ubuntu.com>
Tue, 28 Mar 2006 17:05:42 +0000 (19:05 +0200)
apt-pkg/acquire.cc
debian/changelog

index 57cf60bfe1f46bbf2851b46768bc372c394ebc53..a9a7709051e4349063db2a1bea291b081a666de3 100644 (file)
@@ -818,7 +818,13 @@ bool pkgAcquireStatus::Pulse(pkgAcquire *Owner)
       unsigned long ETA =
         (unsigned long)((TotalBytes - CurrentBytes) / CurrentCPS);
 
-      snprintf(msg,sizeof(msg), _("Downloading file %li of %li (%s remaining)"), i, TotalItems, TimeToStr(ETA).c_str());
+      // only show the ETA if it makes sense
+      if (ETA > 0 && ETA < 172800 /* two days */ )
+        snprintf(msg,sizeof(msg), _("Downloading file %li of %li (%s remaining)"), i, TotalItems, TimeToStr(ETA).c_str());
+      else
+        snprintf(msg,sizeof(msg), _("Downloading file %li of %li"), i, TotalItems);
+        
+
 
       // build the status str
       status << "dlstatus:" << i
index 64c743a7f32497f50b170baadc57e4f5af6f573d..c8a3271de0498745709adfd1ddf2d9b76f125fb6 100644 (file)
@@ -1,3 +1,9 @@
+apt (0.6.43.4) unstable; urgency=low
+
+  * apt-pkg/acquire.cc: don't show ETA if it is 0 or absurdely large
+
+ --
+
 apt (0.6.43.3) unstable; urgency=low
 
   * Merge bubulle@debian.org--2005/apt--main--0 up to patch-186: