Compare commits
10 Commits
00a80f79c8
...
b3ca122ca5
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b3ca122ca5 | ||
|
|
76572a33ba | ||
|
|
267d11c94b | ||
|
|
5aebeeddc8 | ||
|
|
75f8457df4 | ||
|
|
8da196c0a5 | ||
|
|
1d48c91492 | ||
|
|
2b3c7036e6 | ||
|
|
cf4968a4fb | ||
|
|
8231c5e602 |
@ -1,18 +0,0 @@
|
|||||||
commit fbc995805e9d860366c67819effc3bc7d5d8a8b2
|
|
||||||
Author: Zdenek Pavlas <zpavlas@redhat.com>
|
|
||||||
Date: Mon Jan 13 13:20:28 2014 +0100
|
|
||||||
|
|
||||||
Don't set speed=0 on a new mirror that 404'd. BZ 1051554
|
|
||||||
|
|
||||||
diff --git a/urlgrabber/grabber.py b/urlgrabber/grabber.py
|
|
||||||
index ef18d6a..04f1179 100644
|
|
||||||
--- a/urlgrabber/grabber.py
|
|
||||||
+++ b/urlgrabber/grabber.py
|
|
||||||
@@ -2418,6 +2418,7 @@ class _TH:
|
|
||||||
speed = (k1 * speed + k2 * dl_size / dl_time) / (k1 + k2)
|
|
||||||
fail = 0
|
|
||||||
elif getattr(ug_err, 'code', None) == 404:
|
|
||||||
+ if not ts: return # 1st update, avoid speed=0
|
|
||||||
fail = 0 # alive, at least
|
|
||||||
else:
|
|
||||||
fail += 1 # seems dead
|
|
||||||
@ -1,14 +1,12 @@
|
|||||||
Name: python-urlgrabber
|
Name: python-urlgrabber
|
||||||
Version: 3.10.1
|
Version: 4.1.0
|
||||||
Release: 18
|
Release: 1
|
||||||
Summary: Cross-protocol urlgrabber
|
Summary: Cross-protocol urlgrabber
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
Url: http://urlgrabber.baseurl.org/
|
Url: http://urlgrabber.baseurl.org/
|
||||||
Source0: http://urlgrabber.baseurl.org/download/urlgrabber-%{version}.tar.gz
|
Source0: https://github.com/rpm-software-management/urlgrabber/releases/download/urlgrabber-4-1-0/urlgrabber-%{version}.tar.gz
|
||||||
Patch1: BZ-1051554-speed-on-404-mirror.patch
|
|
||||||
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
BuildRequires: python2-pycurl python2-devel
|
|
||||||
|
|
||||||
%global _description\
|
%global _description\
|
||||||
It is a urlgrabber.We can use it to fetch data in three ways.Urlgrab copies\
|
It is a urlgrabber.We can use it to fetch data in three ways.Urlgrab copies\
|
||||||
@ -18,34 +16,45 @@ and use this package.
|
|||||||
|
|
||||||
%description %_description
|
%description %_description
|
||||||
|
|
||||||
%global _package_python2 python2-urlgrabber
|
%package -n python3-urlgrabber
|
||||||
|
|
||||||
%package -n %_package_python2
|
|
||||||
Summary: %summary
|
Summary: %summary
|
||||||
Provides: urlgrabber = %{version}-%{release}
|
Provides: urlgrabber = %{version}-%{release}
|
||||||
Requires: python2-pycurl
|
BuildRequires: python3-devel python3dist(setuptools) python3dist(pycurl) python3dist(six)
|
||||||
%{?python_provide:%python_provide python2-urlgrabber}
|
%{?python_provide:%python_provide python3-urlgrabber}
|
||||||
|
|
||||||
%description -n %_package_python2 %_description
|
%description -n python3-urlgrabber %_description
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n urlgrabber-%{version}
|
%autosetup -n urlgrabber-%{version} -p1
|
||||||
%patch1 -p1
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%py2_build
|
%py3_build
|
||||||
|
sed -e "s|/usr/bin/python|%{__python3}|" -i scripts/*
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%py2_install
|
%py3_install
|
||||||
rm -rf $RPM_BUILD_ROOT/%{_docdir}/urlgrabber-%{version}
|
rm -rf $RPM_BUILD_ROOT/%{_docdir}/urlgrabber-%{version}
|
||||||
|
|
||||||
%files -n %_package_python2
|
%files -n python3-urlgrabber
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
%doc README ChangeLog TODO
|
%doc README ChangeLog TODO
|
||||||
%{_bindir}/urlgrabber
|
%{_bindir}/urlgrabber
|
||||||
%{python2_sitelib}/urlgrabber*
|
%{_libexecdir}/urlgrabber-ext-down
|
||||||
%attr(0755,root,root) %{_libexecdir}/urlgrabber-ext-down
|
%{python3_sitelib}/urlgrabber
|
||||||
|
%{python3_sitelib}/urlgrabber-%{version}-py%{python3_version}.egg-info/
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Jun 14 2023 yaoxin <yao_xin001@hoperun.com> - 4.1.0-1
|
||||||
|
- Update to 4.1.0
|
||||||
|
|
||||||
|
* Sat Dec 18 2021 shixuantong<shixuantong@huawei.com> - 4.0.1-3
|
||||||
|
- fix build fail
|
||||||
|
|
||||||
|
* Thu Aug 27 2020 shixuantong<shixuantong@huawei.com> - 4.0.1-2
|
||||||
|
- remove python2
|
||||||
|
|
||||||
|
* Fri Feb 28 2020 lingsheng <lingsheng@huawei.com> - 4.0.0-1
|
||||||
|
- update version to 4.0.0
|
||||||
|
|
||||||
* Fri Feb 14 2020 Jiangping Hu <hujp1985@foxmail.com> - 3.10.1-18
|
* Fri Feb 14 2020 Jiangping Hu <hujp1985@foxmail.com> - 3.10.1-18
|
||||||
- Package init
|
- Package init
|
||||||
|
|||||||
4
python-urlgrabber.yaml
Normal file
4
python-urlgrabber.yaml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
version_control: NA
|
||||||
|
src_repo: NA
|
||||||
|
tag_prefix: NA
|
||||||
|
seperator: NA
|
||||||
Binary file not shown.
BIN
urlgrabber-4.1.0.tar.gz
Normal file
BIN
urlgrabber-4.1.0.tar.gz
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user