Sfoglia il codice sorgente

* merged from main

Michael Vogt 20 anni fa
parent
commit
5975dc1b05
3 ha cambiato i file con 15 aggiunte e 2 eliminazioni
  1. 7 1
      apt-pkg/acquire.cc
  2. 6 0
      debian/changelog
  3. 2 1
      debian/rules

+ 7 - 1
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), _("Retrieving file %li of %li (%s remaining)"), i, TotalItems, TimeToStr(ETA).c_str());
+      else
+	 snprintf(msg,sizeof(msg), _("Retrieving file %li of %li"), i, TotalItems);
+	 
+
 
       // build the status str
       status << "dlstatus:" << i

+ 6 - 0
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:

+ 2 - 1
debian/rules

@@ -36,6 +36,7 @@ endif
 # Default rule
 build:
 
+PKG=apt
 DEB_BUILD_PROG:=debuild --preserve-envvar PATH --preserve-envvar CCACHE_DIR -us -uc $(DEB_BUILD_PROG_OPTS)
 APT_DEBVER=$(shell dpkg-parsechangelog |sed -n -e '/^Version:/s/^Version: //p')
 APT_CONFVER=$(shell sed -n -e 's/^AC_DEFINE_UNQUOTED(VERSION,"\(.*\)")/\1/p' configure.in)
@@ -335,6 +336,6 @@ cvs-mkul:
 arch-build:
 	rm -rf debian/arch-build
 	mkdir -p debian/arch-build/apt-$(APT_DEBVER)
-	baz inventory -s | xargs cp -a --parents --target=debian/arch-build/apt-$(APT_DEBVER)
+	tar -c --exclude=arch-build -f - `bzr inventory` | (cd debian/arch-build/$(PKG)-$(DEBVER);tar xf -)
 	$(MAKE) -C debian/arch-build/apt-$(APT_DEBVER) startup doc
 	(cd debian/arch-build/apt-$(APT_DEBVER); $(DEB_BUILD_PROG))