[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Checking successful downloads broken



On Mon, Mar 04, 2002 at 04:54:33PM +1000, Anthony Towns wrote:
> Package: debootstrap
> Version: 0.1.16.4
> Severity: serious
> Tags: patch
> 
> Careful with those followups.
> 
> On Sun, Mar 03, 2002 at 06:14:37PM -0700, Chris Tillman wrote:
> > > Debootstrap itself probably won't be able to spot failed downloads
> > > of the Release file because its error checking relies on $PIPESTATUS
> > > which ash doesn't seem to support.
> > No _that_ sounds like a root cause.
> 
> It does indeed. The fix is to make sure pkgdetails' exit code reflects
> whether the download succeeded or not. Doing:
> 
> diff -urb debootstrap-0.1.16/functions debootstrap-0.1.16.new/functions
> --- debootstrap-0.1.16/functions        Sun Jan 20 20:29:12 2002
> +++ debootstrap-0.1.16.new/functions    Mon Mar  4 16:46:00 2002


During the download of the Packages.gz file, pkgdetails is run for each package. 
This can take quite a while on a slow machine, and should also report progress. 
One user reported 8 minutes. 

I believe this might handle it; but I'm really new at this stuff, please check
and correct:

diff -u debootstrap-0.1.16.2/functions debootstrap-0.1.16.2.chg/functions
--- debootstrap-0.1.16.2/functions	Fri Feb  1 10:44:05 2002
+++ debootstrap-0.1.16.2.chg/functions	Sun Mar  3 16:24:13 2002
@@ -393,6 +393,11 @@
   done
   progress 100 100 "Downloading Packages file"
 
+  local numpkg=0
+  for p in "$@"; do numpkg++; done
+  local pkgidx=0
+  progress $pkgidx $numpkg "Downloading package details"
+  
   for p in "$@"; do
     for c in $COMPONENTS; do
       local details=""
@@ -417,6 +422,7 @@
     if [ "$details" != "done" ]; then
       error 1 "Couldn't download $p"
     fi
+    progress $pkgidx++ $numpkg "Downloading package details"
   done
 }
 
Only in debootstrap-0.1.16.2.chg/: pkgdetails
Only in debootstrap-0.1.16.2.chg/: pkgdetails.o


-- 
*------v--------- Installing Debian GNU/Linux 3.0 --------v------*
|      <http://www.debian.org/releases/woody/installmanual>      |
|   debian-imac (potato): <http://debian-imac.sourceforge.net>   |
|            Chris Tillman        tillman@voicetrak.com          |
|                   May the Source be with you                   |
*----------------------------------------------------------------*



Reply to: