rpms/python-urlgrabber/F-9 python-urlgrabber.spec, 1.28, 1.29 urlgrabber-progress-ui.patch, 1.4, 1.5

James Antill (james) fedora-extras-commits at redhat.com
Mon Jun 16 05:02:44 UTC 2008


Author: james

Update of /cvs/pkgs/rpms/python-urlgrabber/F-9
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv19569

Modified Files:
	python-urlgrabber.spec urlgrabber-progress-ui.patch 
Log Message:
* Sun Jun 15 2008 James Antill <james at fedoraproject.org> 3.0.0-9
- Don't count partial downloads toward the total



Index: python-urlgrabber.spec
===================================================================
RCS file: /cvs/pkgs/rpms/python-urlgrabber/F-9/python-urlgrabber.spec,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- python-urlgrabber.spec	17 May 2008 17:41:48 -0000	1.28
+++ python-urlgrabber.spec	16 Jun 2008 05:01:52 -0000	1.29
@@ -3,7 +3,7 @@
 Summary: A high-level cross-protocol url-grabber
 Name: python-urlgrabber
 Version: 3.0.0
-Release: 8%{?dist}
+Release: 9%{?dist}
 Source0: urlgrabber-%{version}.tar.gz
 Patch0: urlgrabber-keepalive.patch
 Patch1: urlgrabber-string-type.patch
@@ -30,7 +30,7 @@
 %patch1 -p1
 %patch2 -p1
 %patch3 -p0
-%patch4 -p0
+%patch4 -p1
 %patch5 -p1
 
 %build
@@ -51,6 +51,9 @@
 %{_bindir}/urlgrabber
 
 %changelog
+* Sun Jun 15 2008 James Antill <james at fedoraproject.org> 3.0.0-9
+- Don't count partial downloads toward the total
+
 * Sat May 18 2008 James Antill <james at fedoraproject.org> 3.0.0-8
 - Tweak progress output so it's hopefully less confusing
 - Add dynamic resizing ability to progress bar

urlgrabber-progress-ui.patch:

Index: urlgrabber-progress-ui.patch
===================================================================
RCS file: /cvs/pkgs/rpms/python-urlgrabber/F-9/urlgrabber-progress-ui.patch,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- urlgrabber-progress-ui.patch	17 May 2008 17:41:48 -0000	1.4
+++ urlgrabber-progress-ui.patch	16 Jun 2008 05:01:52 -0000	1.5
@@ -1,12 +1,7 @@
-Index: urlgrabber/progress.py
-===================================================================
-RCS file: /home/groups/urlgrabber/cvs-root/urlgrabber/urlgrabber/progress.py,v
-retrieving revision 1.7
-diff -u -r1.7 progress.py
---- urlgrabber/progress.py	19 Aug 2005 21:59:07 -0000	1.7
-+++ urlgrabber/progress.py	17 May 2008 17:33:32 -0000
-@@ -23,8 +23,75 @@
- import time
+diff -rup urlgrabber-3.0.0-orig/urlgrabber/progress.py urlgrabber-3.0.0/urlgrabber/progress.py
+--- urlgrabber-3.0.0-orig/urlgrabber/progress.py	2008-06-16 00:48:52.000000000 -0400
++++ urlgrabber-3.0.0/urlgrabber/progress.py	2008-06-16 00:49:25.000000000 -0400
+@@ -24,7 +24,74 @@ import time
  import math
  import thread
  import types
@@ -82,7 +77,7 @@
  class BaseMeter:
      def __init__(self):
          self.update_period = 0.3 # seconds
-@@ -83,6 +150,64 @@
+@@ -84,6 +151,64 @@ class BaseMeter:
      def _do_end(self, amount_read, now=None):
          pass
          
@@ -147,7 +142,7 @@
  class TextMeter(BaseMeter):
      def __init__(self, fo=sys.stderr):
          BaseMeter.__init__(self)
-@@ -97,37 +222,73 @@
+@@ -98,38 +223,80 @@ class TextMeter(BaseMeter):
              text = self.text
          else:
              text = self.basename
@@ -226,15 +221,22 @@
 +                                    ui_size, ui_time, ui_end)
 +        self.fo.write(out)
          self.fo.flush()
+ 
++        # Don't add size to the sofar size until we have all of it.
++        # If we don't have a size, then just pretend/hope we got all of it.
++        if self.size is not None and amount_read != self.size:
++            return
++
 +        if _text_meter_total_size:
 +            _text_meter_sofar_size += amount_read
 +        if _text_meter_total_size <= _text_meter_sofar_size:
 +            _text_meter_total_size = 0
 +            _text_meter_sofar_size = 0
- 
++
  text_progress_meter = TextMeter
  
-@@ -396,10 +557,12 @@
+ class MultiFileHelper(BaseMeter):
+@@ -397,10 +564,12 @@ class RateEstimator:
          #print 'times', now, self.last_update_time
          time_diff = now         - self.last_update_time
          read_diff = amount_read - self.last_amount_read
@@ -250,7 +252,7 @@
          #print 'results', time_diff, read_diff, self.ave_rate
          
      #####################################################################
-@@ -528,3 +691,49 @@
+@@ -529,3 +698,49 @@ def format_number(number, SI=0, space=' 
          format = '%.0f%s%s'
          
      return(format % (float(number or 0), space, symbols[depth]))
@@ -300,3 +302,4 @@
 +         (100000, 0.1), (10000, 0.1), (10000, 0.1), (10000, 0.1),
 +         (100000, 0.1), (10000, 0.1), (10000, 0.1), (10000, 0.1),
 +         (100000, 0.1), (1, 0.1))
+Only in urlgrabber-3.0.0/urlgrabber: progress.py.orig




More information about the fedora-extras-commits mailing list