[packagekit] how make a percercent on downloading ....

zodman zodman at gmail.com
Mon Feb 16 00:39:20 PST 2009


is this correct ?¿


allow-cancel	true
percentage	0
status	running
status	installing
status	download
percentage	0
subpercentage	0
subpercentage	100
percentage	11
status	dep-resolve
percentage	21
allow-cancel	false
percentage	31
status	download
percentage	31
subpercentage	0
subpercentage	18
subpercentage	37
subpercentage	55
subpercentage	74
subpercentage	93
subpercentage	100
percentage	61
status	rollback
percentage	71
percentage	73
percentage	73
status	install
package	installing 
christine:data;0.2.1-1-1;x86;/foresight.rpath.org at fl:2-qa/0.2.1-1-1#	
percentage	84
percentage	84
status	install
package	installing 
christine:python;0.2.1-1-1;x86;/foresight.rpath.org at fl:2-qa/0.2.1-1-1#	
percentage	86
percentage	86
status	install
package	installing 
christine:runtime;0.2.1-1-1;x86;/foresight.rpath.org at fl:2-qa/0.2.1-1-1#	
percentage	88
percentage	88
status	install
package	installing 
christine;0.2.1-1-1;x86;/foresight.rpath.org at fl:2-qa/0.2.1-1-1#{'category': 
[], 'version': '0.2.1-1-1', 'name': 'christine', 'label': 
'foresight.rpath.org at fl:2-qa'}	
percentage	90
percentage	90
status	install
package	installing 
christine:locale;0.2.1-1-1;x86;/foresight.rpath.org at fl:2-qa/0.2.1-1-1#	
percentage	92
percentage	92
status	install
package	installing 
christine:data;0.2.1-1-1;x86;/foresight.rpath.org at fl:2-qa/0.2.1-1-1#	
percentage	92
percentage	94
percentage	94
status	install
package	installing 
christine:python;0.2.1-1-1;x86;/foresight.rpath.org at fl:2-qa/0.2.1-1-1#	
percentage	94
percentage	96
percentage	96
status	install
package	installing 
christine:runtime;0.2.1-1-1;x86;/foresight.rpath.org at fl:2-qa/0.2.1-1-1#	
percentage	96
percentage	98
percentage	98
status	install
package	installing 
christine;0.2.1-1-1;x86;/foresight.rpath.org at fl:2-qa/0.2.1-1-1#{'category': 
[], 'version': '0.2.1-1-1', 'name': 'christine', 'label': 
'foresight.rpath.org at fl:2-qa'}	
percentage	98
percentage	100
percentage	100
status	install
package	installing 
christine:locale;0.2.1-1-1;x86;/foresight.rpath.org at fl:2-qa/0.2.1-1-1#	
percentage	100
status	commit
percentage	100
percentage	100
finished



Richard Hughes escribió:
> On Fri, 2009-02-13 at 02:29 -0600, zodman wrote:
>> How can i make a bar percent for represent  the download of changeset
>> some like:
>> DownloadFiles [ ==========          ]  #%%
> 
> Okay, PackageKit doesn't really have the notion of percentage-tasks.
> PackageKit has three concepts:
> 
> * StatusChanged (tell the UI what you are doing)
> * PercentageChanged (including all the operations of the transactions)
> * SubPercentageChanged (which is a small part of the transaction, e.g.
> downloading)
> 
> Percentage is what we show on the UI, and also what we use for the time
> estimation, so it's important you use that too.
> 
> What you should be doing is something like this:
> 
> PC 0
> STATUS downloading
> SPC 0
> SPC 10
> SPC 50
> PC 25
> SPC 80
> SPC 100
> STATUS installing
> SPC 0
> SPC 10
> PC 50
> SPC 50
> SPC 80
> SPC 100
> STATUS cleaning up
> SPC 0
> SPC 50
> PC 75
> SPC 100
> PC 100
> 
> Now, a sub task doesn't have to be "download everything", a sub-task can
> be download package A, and another sub-task for download package B.
> PackageKit doesn't define what a sub task it, as that would be different
> for all the backends.
> 
> You should also try to do as many PercentageChanged events as possible,
> as this makes the time remaining calculations more accurate, and also
> makes the progress bar move smoothly from left to right without
> stopping.
> 
> Richard.
> 
> 
> _______________________________________________
> PackageKit mailing list
> PackageKit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/packagekit
> 




More information about the PackageKit mailing list