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

Bug#492861: Progress bar rewinds when running pre-pkgsel.d/10popcon

On Thu, Jul 31, 2008 at 12:30:27PM +0200, Frans Pop wrote:
> On Tuesday 29 July 2008, Jérémy Bobbio wrote:
> > One solution to solve this would be to change the API of pre-pkgsel.d
> > scripts.  They could have the current progress step as their
> > command-line argument and echo the standard output the new progress
> > step.
> Wouldn't it be better to use a fixed range for pre-pkgsel scripts and 
> divide that up over the number of scripts being run? It could even be 
> coded so that the more hook scripts there are, the bigger the part of the 
> progress bar that's allocated to them (still leaving the majority for 
> tasksel of course).

As far as my imagination goes, the problem in this approach lies in the
debconf-apt-progress interface.  It takes:
  --from <start position> --to <end position>

debconf-apt-progress is used (at least) by the popcon pre-pkgsel.d
script.  So we would at least need to change the way pre-pkgsel.d
scripts are called to give them their allocated start and end position
on the progress bar.

I have moved away from this approach for the proposed one to support
the idea, already present in the current pkgsel postinst, that a step
that would do nothing should not take space in the progress bar

Another point is that the proposed approach makes it easy to support
scripts that want control on their progress bar and those who do not.  
Having a script echoing back a new position is an easy way to determine
that it did move the progress bar forward.  In your approach, we could
always add a "db_progress SET" once they have been called to cope with
scripts which did not, but well, it not as elegant, IMHO.

> I don't really like the idea of hook scripts determining how the main 
> script works.

I can understand that.  I pondered it for a while and the only thing
that could be broken with a broken script would be the progress bar.
And as the loop verifies that the returned position is always greater
than the previous one, this issue is a little bit mitigated.

If we don't agree to something, we can always remove the
usage of debconf-apt-progress in the popcon script.  It's only one
package and on top of that quite small.  We could always continue to
discuss changes to pkgsel once Lenny is out.

Jérémy Bobbio                        .''`. 
lunar@debian.org                    : :Ⓐ  :  # apt-get install anarchism
                                    `. `'` 

Attachment: signature.asc
Description: Digital signature

Reply to: