patch for yum ticket 14 - make sure urlgrabber checks file:// urls, too

epel9
Seth Vidal 16 years ago
parent d443f77408
commit 5589527d30

@ -3,7 +3,7 @@
Summary: A high-level cross-protocol url-grabber Summary: A high-level cross-protocol url-grabber
Name: python-urlgrabber Name: python-urlgrabber
Version: 3.0.0 Version: 3.0.0
Release: 12%{?dist} Release: 13%{?dist}
Source0: urlgrabber-%{version}.tar.gz Source0: urlgrabber-%{version}.tar.gz
Patch0: urlgrabber-keepalive.patch Patch0: urlgrabber-keepalive.patch
Patch1: urlgrabber-string-type.patch Patch1: urlgrabber-string-type.patch
@ -13,6 +13,7 @@ Patch4: urlgrabber-progress-ui.patch
Patch5: urlgrabber-grab-no-range.patch Patch5: urlgrabber-grab-no-range.patch
Patch6: urlgrabber-no-ssl-ok.patch Patch6: urlgrabber-no-ssl-ok.patch
Patch7: urlgrabber-extra-progress.patch Patch7: urlgrabber-extra-progress.patch
Patch8: urlgrabber-file-checkfunc.patch
License: LGPLv2+ License: LGPLv2+
Group: Development/Libraries Group: Development/Libraries
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
@ -36,7 +37,7 @@ authentication, proxies and more.
%patch5 -p1 %patch5 -p1
%patch6 -p1 %patch6 -p1
%patch7 -p1 %patch7 -p1
%patch8 -p1
%build %build
python setup.py build python setup.py build
@ -55,6 +56,9 @@ rm -rf $RPM_BUILD_ROOT
%{_bindir}/urlgrabber %{_bindir}/urlgrabber
%changelog %changelog
* Mon Mar 9 2009 Seth Vidal <skvidal at fedoraproject.org>
- apply patch for urlgrabber to properly check file:// urls with the checkfunc
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0.0-12 * Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0.0-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

@ -0,0 +1,16 @@
--- foo/urlgrabber/grabber.py~ 2009-03-09 12:01:21.000000000 -0400
+++ foo/urlgrabber/grabber.py 2009-03-09 12:01:21.000000000 -0400
@@ -913,6 +913,13 @@
raise URLGrabError(3,
_('Not a normal file: %s') % (path, ))
elif not opts.range:
+ if not opts.checkfunc is None:
+ cb_func, cb_args, cb_kwargs = \
+ self._make_callback(opts.checkfunc)
+ obj = CallbackObject()
+ obj.filename = path
+ obj.url = url
+ apply(cb_func, (obj, )+cb_args, cb_kwargs)
return path
def retryfunc(opts, url, filename):
Loading…
Cancel
Save