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

Re: Bug#185424: base-config: Should display progress bar while installing packages



On Tue, Aug 02, 2005 at 08:41:53PM +0100, Colin Watson wrote:
> On Fri, Jul 29, 2005 at 11:55:15PM +0100, Colin Watson wrote:
[..]
> > I've tested this (with the accompanying one-line patch to aptitude where
> > it calls DoInstall()), and after a conversation with Michael in which we
> > fixed up some minor issues it now works fine. Having it in mainline apt
> > soon would be fantastic.
> 
> I've implemented a first cut at the base-config code for this (although
> in Ubuntu base-config which uses aptitude rather than tasksel, so it
> would take a small change to port it to Debian; however I've made it
> fairly generic so I don't expect it to be difficult), which I'm testing
> at the moment.
> 
> There's one considerable snag though. While Michael's
> apt--progress-reporting--0 branch reports installation progress nicely,
> it doesn't report download progress at all. This is rather a showstopper
> for base-config on netinst installs, for instance; it just sits at 0%
> for ages. Is there any chance that apt could do something a bit like
> debootstrap, where it reports the progress through various stages
> (preparation?, download/retrieval, installation) in turn, and the
> calling code gets to munge these together into a unified progress bar if
> it wants to do so?

I added the needed support to apt (in my apt--progress-reporting--0
branch) as part of the pkgAcquireStatus::Pulse() code. It should work
with aptitude without modifications.

It adds a new "dlstatus" that will report the current download
status:
------------------------8<------------------------
dlstatus:AlreadDownloaded:TotalPercentage:action-description

AlreadyDownloaded = the number of already downloaded packages
TotalPercentage = the total progress between [0..100]
description = a i18ned human readable decription of the current action

Example:
dlstatus:1:9.05654:Downloading file 1 of 3 (4m40s remaining)
dlstatus:1:9.46357:Downloading file 1 of 3 (4m39s remaining)
dlstatus:1:9.61022:Downloading file 1 of 3 (4m38s remaining)
------------------------8<------------------------

(the old "status" is renamed to "pmstatus" to make it easier to
distinguish). 

Feedback is (as always) welcome. Please note that the patch breaks the
ABI.

Cheers,
 Michael

-- 
Linux is not The Answer. Yes is the answer. Linux is The Question. - Neo



Reply to: