[packagekit] packagekit.progress.py

zodman zodman at gmail.com
Thu Feb 19 21:58:21 PST 2009


my final changes ... its the last ........


diff --git a/lib/python/packagekit/progress.py 
b/lib/python/packagekit/progress.py
index d0f33f4..644ba98 100644
--- a/lib/python/packagekit/progress.py
+++ b/lib/python/packagekit/progress.py
@@ -38,6 +38,10 @@ class PackagekitProgress:
              print "progress : %s " % progress.percent
          progress.step() # step to next milestone

+
+    *** NOTE! a BIGNOTE:
+        if you do a progress.step() and if the next is a sub_percent() 
  _not print the percente_ first
+        set_subpercent an then print progress.percent.
      '''

      #TODO: Add support for elapsed/remaining time
@@ -91,7 +95,7 @@ class PackagekitProgress:
          else:
              startpct = self.steps[self.current_step-1]
          if self.current_step < len(self.steps)-1:
-            endpct = self.steps[self.current_step+1]
+            endpct = self.steps[self.current_step]
          else:
              endpct = 100
          deltapct = endpct -startpct

im i commit that ?¿


Richard Hughes escribió:
> On Wed, 2009-02-18 at 02:52 -0600, zodman wrote:
>> Im play with it but im confuse:
>>
>> from the code
>>
>> if i set progress.set_step( [10, 30, 50, 70] )
>>
>>
>> print start at 0% end 30% doing a progress.step() ( 100 prints )
>> then
>> start at 10% end 50% do a progress.step()
>>
>> start at 30% end 70% step()
>>
>> start at 50% end 100% step ()
>>
>> ??????????????????
>>
>> its that correct this ?¿
> 
> I'm not sure I understand, sorry (original code was written by Robin
> IIRC):
> 
> This code is used by apt, conary, pisi, smart, yum -- so what exactly
> does your patch change? Does anyone else have any comments?
> 
> Richard.
> 
> 
> _______________________________________________
> PackageKit mailing list
> PackageKit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/packagekit




More information about the PackageKit mailing list