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

cdebconf progress bars and debootstrap



Well, after "discussing" with aj for a while, he had the following
comment about the cdebconf progress bar API:
  "it sucks"
;-)

Myself, I am of the opinion that it was a bad idea not to look at what
debootstrap and b-f use, when designing the API.

Short summary:
cdebconf progress bars:
  progress start <min> <max> <title>
  progress step <inc> <info>
  progress stop
debootstrap:
  P: <curr> <max> <title>
  I: <info>

This is very incompatible, especially since the cdebconf way means that
<inc> is added *after* the <info> is displayed. I hacked around this in
debootstrap to add a --debian-installer flag but aj thought it was much
too horrible to include. I agree with him, though I wish he'd said it
before I spent the hours doing this. Someone bloody well owes me a beer!
;)

Thus, I suggest we change the API for cdebconf progress bar to match
what b-f and debootstrap use. Something like:

progress start (can still use this one, and it makes sense)
progress step <inc>  (or  progress set <val>)
progress info <info>
progress stop

This means that when we (i.e. Thorsten in cdrom-checker and I in anna)
used
  progress step 1 some/template
  <do something>
we should instead use
  progress info some/template
  <do something>
  progress inc 1
which is much more compatible with debootstrap and it still makes sense.

Comments? tausq?


/M

Attachment: signature.asc
Description: Detta =?ISO-8859-1?Q?=E4r?= en digitalt signerad meddelandedel


Reply to: