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

Re: patch to fix debootstrap invocation on local archive



Thu, Apr 12, 2001 at 01:12:40AM +1000 wrote:
> On Wed, Apr 11, 2001 at 10:53:33AM -0400, Adam Di Carlo wrote:
> > Anyhow, this does highlight that we need to cope with errors and
> > problems in debootstrap a *lot* more gracefully.   I don't know if
> > that has well defined exit codes (archive not found, out of memory,
> > out of disk, etc).  I hope so, because we can't very well do an
> > interface without that.
>
> Yes, this needs fixing. How should boot-floppies and debootstrap interact?
>
> Possible interactions are:
>
>       * failures/success (duh)

We definately need to get the return code better.  That is our fault at the 
moment. As it is we're using popen() so we can also log the progress, though
that doesn't give us a useful return code.  We should be calling wait4()
manually, or similar, I think.

>
>       * progress -- how much has downloaded (x%), what's happening
>         (I: installing essential packages), etc
It would be really nice to have some %'s, like apt-get.

>
>       * interactivity -- "please insert the 5th base-system floppy"
I was hoping debootstrap would be able to do its job without any interaction.
As currently written we can't handle interactivity, though I could change that
if it is desired.  We aren't supporting base system on floppies,  unless someone
really wants to.

> I'm happy to do just about anything on the debootstrap end for this;
> what's convenient for boot-floppies? Calling a program, displaying the
> slang stuff "myself", using a named pipe, using stdio?

I'd suggest continuing to use stdout, and then exit with a helpful return code.
As currently written we have about 3 lines that can be used to tell the user
what is going on.  We're just taking every line from debootstrap's stdout,
example :

http://people.debian.org/~dwhedon/debootstrap.png

With that in mind, maybe replacing the 'trying to get' string with a % of the
total bytes to download, and I'll work on catching the return code 
intelligently.  The rest looks good.

David



Reply to: