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

Bug#618920: marked as done (debootstrap: needs more robust download error handling)

Your message dated Tue, 13 Mar 2012 17:32:12 +0000
with message-id <E1S7Va0-0003jh-0s@franck.debian.org>
and subject line Bug#618920: fixed in debootstrap 1.0.39
has caused the Debian Bug report #618920,
regarding debootstrap: needs more robust download error handling
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org

618920: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=618920
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
package: debootstrap
version: 1.0.28
severity: important
tags: patch

debootstrap's current download error handling isn't very robust.  It
declares success just for the presence of a downloaded file, which may
be a partial download, or one for which the checksum doesn't match.
Eventually those conditions will lead to unhandled failures elsewhere
within debootstrap.

This can make d-i very rocky on certain mirrors since one bad package
download ultimately lead to a complete failure of the debootstrap
process, and thus a failed install.  An expert can recover from this,
but an average user will get rather frustrated (especially since the
dialogs for debootstrap errors are rather confusing).  

It may also be useful to expand a bit on these d-i debootstrap error
messages: when an error happens, the right answer that the user wants is
to hit 'go back' twice in a row to start the debootstrap all over again,
but the dialogs are confusing, and 'continue' seems to be the obvious
choice, but that will lead to the broken debootstrap continuing to
completion with various brokenness. Anyway, that maybe should be
submitted as another bug.

So, back to the original issue, I've created a patch that will retry
downloads whenever anything in the "get" routine fails, which I
believe is much more robust than the current situation.  Please see
attached patch.

Best wishes,
--- newhd/source/debootstrap-1.0.28/functions	2011-02-21 19:25:08.000000000 -0500
+++ /usr/share/debootstrap/functions	2011-03-19 10:58:57.000000000 -0400
@@ -1,3 +1,5 @@
 ############################################################### smallutils
 smallyes() {
@@ -241,6 +243,13 @@
 get () {
+	for iters in $(seq 1 $MAXATTEMPTS); do
+		if single_get "$@"; then break; fi
+		warning RETRYING "Retrying failed download."
+	done
+single_get () {
 	# args: from dest 'nocache'
 	# args: from dest [checksum size] [alt {checksum size type}]
 	local displayname
@@ -331,13 +340,6 @@
 		# http/ftp mirror
 		if wgetprogress -O "$dest" "$from"; then
 			return 0
-		elif [ -s "$dest" ]; then
-			local iters=0
-			while [ "$iters" -lt 3 ]; do
-				warning RETRYING "Retrying failed download of %s" "$from"
-				if wgetprogress -c -O "$dest" "$from"; then break; fi
-				iters="$(($iters + 1))"
-			done
 			rm -f "$dest"
 			return 1
@@ -346,13 +348,6 @@
 		# http/ftp mirror
 		if wgetprogress $CHECKCERTIF $CERTIFICATE $PRIVATEKEY -O "$dest" "$from"; then
 			return 0
-		elif [ -s "$dest" ]; then
-			local iters=0
-			while [ "$iters" -lt 3 ]; do
-				warning RETRYING "Retrying failed download of %s" "$from"
-				if wgetprogress $CHECKCERTIF $CERTIFICATE $PRIVATEKEY -c -O "$dest" "$from"; then break; fi
-				iters="$(($iters + 1))"
-			done
 			rm -f "$dest"
 			return 1

--- End Message ---
--- Begin Message ---
Source: debootstrap
Source-Version: 1.0.39

We believe that the bug you reported is fixed in the latest version of
debootstrap, which is due to be installed in the Debian FTP archive:

  to main/d/debootstrap/debootstrap-udeb_1.0.39_all.udeb
  to main/d/debootstrap/debootstrap_1.0.39.dsc
  to main/d/debootstrap/debootstrap_1.0.39.tar.gz
  to main/d/debootstrap/debootstrap_1.0.39_all.deb

A summary of the changes between this version and the previous one is

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 618920@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
Colin Watson <cjwatson@debian.org> (supplier of updated debootstrap package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)

Hash: SHA256

Format: 1.8
Date: Tue, 13 Mar 2012 17:21:13 +0000
Source: debootstrap
Binary: debootstrap debootstrap-udeb
Architecture: source all
Version: 1.0.39
Distribution: unstable
Urgency: low
Maintainer: Debian Install System Team <debian-boot@lists.debian.org>
Changed-By: Colin Watson <cjwatson@debian.org>
 debootstrap - Bootstrap a basic Debian system
 debootstrap-udeb - Bootstrap the Debian system (udeb)
Closes: 618920
 debootstrap (1.0.39) unstable; urgency=low
   * Retry corrupted downloads rather than carrying on almost regardless.
     Patch mostly due to Michael Gilbert, rearranged somewhat by me (closes:
   * Stop at the end of the retrieval phase if any packages failed to
 f64eb6651bbb42ae5747d70da6e425d2a7762de3 1837 debootstrap_1.0.39.dsc
 3db3a8085dcae09f882ab0d35b8ed1455f1c402f 55807 debootstrap_1.0.39.tar.gz
 1ffde8b8f2f80472b8e24cfb99b1862269984665 59020 debootstrap_1.0.39_all.deb
 5f658b8e6fde1a237202d29a61662583da0f2022 19540 debootstrap-udeb_1.0.39_all.udeb
 c50dbc1266ed1da2b4857d61db0b8e4a17c65e2f669ab6a32e9470e7c97734bb 1837 debootstrap_1.0.39.dsc
 ac9dbfae8163c563fee2cf938384a220fa5d5b4639fbe9bde79d125c4a18bb11 55807 debootstrap_1.0.39.tar.gz
 a0fa0001a0b24fbc66b3bc18f3f4d913d654ddb88c3d3e0e56105f8afaa27f42 59020 debootstrap_1.0.39_all.deb
 ff4c94bab93d2f4af6ccc7c8ba4306e932d8677a9f813e5b732ae65370e8a228 19540 debootstrap-udeb_1.0.39_all.udeb
 3b2d1c118227d63de0db7a611200d48d 1837 admin extra debootstrap_1.0.39.dsc
 c06758dfcfd8fdaf3bdb721f7855f399 55807 admin extra debootstrap_1.0.39.tar.gz
 e9c34079aaf1891afcec7d8c8cd6bac5 59020 admin extra debootstrap_1.0.39_all.deb
 368486e8d71c5f2affb19bf77a1ed09e 19540 debian-installer extra debootstrap-udeb_1.0.39_all.udeb
Package-Type: udeb

Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Colin Watson <cjwatson@debian.org> -- Debian developer


--- End Message ---

Reply to: