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

Bug#337191: never displays useful error messages



Package: base-installer
Severity: normal

If debootstrap outputs this:

+ echo E: CORRUPTFILE
+ echo EA: http://ftp.us.debian.org/debian/dists/etch/main/binary-i386/Packages.gz
+ echo EF: %s was corrupt
+ exit 1

(This is just an example, and is normally a warning, not an error, but
any error would be handled the same.)

run-debootstrap does this:

Nov  3 00:36:26 frontend: --> SUBST base-installer/debootstrap/info/validating SECTION Retrieving Packages files
Nov  3 00:36:26 frontend: Adding [SECTION] -> [Retrieving Packages files]
Nov  3 00:36:26 frontend: <-- 0
Nov  3 00:36:26 frontend: --> PROGRESS INFO base-installer/debootstrap/info/validating
Nov  3 00:36:26 frontend: <-- 0 OK
Nov  3 00:36:26 frontend: --> SUBST base-installer/debootstrap/error-exitcode EXITCODE 1
Nov  3 00:36:26 frontend: Adding [EXITCODE] -> [1]
Nov  3 00:36:26 frontend: <-- 0
Nov  3 00:36:26 frontend: --> INPUT critical base-installer/debootstrap/error-exitcode
Nov  3 00:36:26 frontend: <-- 0 question will be asked
Nov  3 00:36:26 frontend: --> GO

The code block to handle E: codes is not firing at all, probably 
because the sig_child handler arrives nearly immediatly after the error text.

So for an error run-debootstrap doesn't pay any attention to the E:
codes which it could use to display a nice informative error message and
instead it just displays the nearly useless message about debootstrap
existing nonzero.

Fixing this will make it much easier to debug debootstrap problems. It
seems to me that run-debootstrap should take care to consume all of its
stdin and process it and display any appropriate messages to the user
even if it's already received a SIGCHILD. Currently it checks several
places for child_exit to be set and exits immediatly if it is.

-- 
see shy jo

Attachment: signature.asc
Description: Digital signature


Reply to: