rpms/python-urlgrabber/devel urlgrabber-no-ssl-ok.patch, NONE, 1.1 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 Jul 28 04:41:01 UTC 2008
Author: james
Update of /cvs/pkgs/rpms/python-urlgrabber/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv7636
Modified Files:
python-urlgrabber.spec urlgrabber-progress-ui.patch
Added Files:
urlgrabber-no-ssl-ok.patch
Log Message:
* Thu Jul 10 2008 James Antill <james at fedoraproject.org> 3.0.0-9
- Make urlgrabber usable if openssl is broken
- Relates: bug#454179
urlgrabber-no-ssl-ok.patch:
--- NEW FILE urlgrabber-no-ssl-ok.patch ---
diff -rup urlgrabber-3.0.0-orig/urlgrabber/keepalive.py urlgrabber-3.0.0/urlgrabber/keepalive.py
--- urlgrabber-3.0.0-orig/urlgrabber/keepalive.py 2006-07-20 16:15:58.000000000 -0400
+++ urlgrabber-3.0.0/urlgrabber/keepalive.py 2008-07-10 17:37:06.000000000 -0400
@@ -328,12 +328,16 @@ class HTTPHandler(KeepAliveHandler, urll
def http_open(self, req):
return self.do_open(HTTPConnection, req)
-class HTTPSHandler(KeepAliveHandler, urllib2.HTTPSHandler):
- def __init__(self):
- KeepAliveHandler.__init__(self)
+# If SSL isn't available, don't make urlgrabber completely unusable
+try:
+ class HTTPSHandler(KeepAliveHandler, urllib2.HTTPSHandler):
+ def __init__(self):
+ KeepAliveHandler.__init__(self)
- def https_open(self, req):
- return self.do_open(HTTPSConnection, req)
+ def https_open(self, req):
+ return self.do_open(HTTPSConnection, req)
+except:
+ pass
class HTTPResponse(httplib.HTTPResponse):
# we need to subclass HTTPResponse in order to
Index: python-urlgrabber.spec
===================================================================
RCS file: /cvs/pkgs/rpms/python-urlgrabber/devel/python-urlgrabber.spec,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- python-urlgrabber.spec 17 May 2008 19:34:19 -0000 1.28
+++ python-urlgrabber.spec 28 Jul 2008 04:40:31 -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
@@ -11,6 +11,7 @@
Patch3: urlgrabber-ftp-port.patch
Patch4: urlgrabber-progress-ui.patch
Patch5: urlgrabber-grab-no-range.patch
+Patch6: urlgrabber-no-ssl-ok.patch
License: LGPLv2+
Group: Development/Libraries
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
@@ -30,8 +31,9 @@
%patch1 -p1
%patch2 -p1
%patch3 -p0
-%patch4 -p0
+%patch4 -p1
%patch5 -p1
+%patch6 -p1
%build
python setup.py build
@@ -51,6 +53,13 @@
%{_bindir}/urlgrabber
%changelog
+* Thu Jul 10 2008 James Antill <james at fedoraproject.org> 3.0.0-9
+- Make urlgrabber usable if openssl is broken
+- Relates: bug#454179
+
+* 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/devel/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 19:34:19 -0000 1.4
+++ urlgrabber-progress-ui.patch 28 Jul 2008 04:40:31 -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