diff options
author | Michael Vogt <michael.vogt@ubuntu.com> | 2006-03-28 19:05:42 +0200 |
---|---|---|
committer | Michael Vogt <michael.vogt@ubuntu.com> | 2006-03-28 19:05:42 +0200 |
commit | 1e8b4c0f25c2d719a036e276f963c5182dee01d5 (patch) | |
tree | fcf02282152a990c646aadcfe57d4c3de3149057 | |
parent | 4be78be38aee3d990c569bbd780695c0529e0442 (diff) |
* only show ETA if that makes sense
-rw-r--r-- | apt-pkg/acquire.cc | 8 | ||||
-rw-r--r-- | debian/changelog | 6 |
2 files changed, 13 insertions, 1 deletions
diff --git a/apt-pkg/acquire.cc b/apt-pkg/acquire.cc index 57cf60bfe..a9a770905 100644 --- a/apt-pkg/acquire.cc +++ b/apt-pkg/acquire.cc @@ -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 diff --git a/debian/changelog b/debian/changelog index 64c743a7f..c8a3271de 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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: |