fix source url 404 bug
This commit is contained in:
parent
8980a9829c
commit
6541858153
21
rpmlint-1.1-changeset1836.patch
Normal file
21
rpmlint-1.1-changeset1836.patch
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
diff -up rpmlint-1.1/SpecCheck.py.404fix rpmlint-1.1/SpecCheck.py
|
||||||
|
--- rpmlint-1.1/SpecCheck.py.404fix 2011-03-03 11:54:47.001854005 -0500
|
||||||
|
+++ rpmlint-1.1/SpecCheck.py 2011-03-03 11:57:11.012854018 -0500
|
||||||
|
@@ -542,14 +542,15 @@ class SpecCheck(AbstractCheck.AbstractCh
|
||||||
|
tag = '%s%s' % (srctype, num)
|
||||||
|
if scheme and netloc:
|
||||||
|
info = self.check_url(pkg, tag, url)
|
||||||
|
+ if not info or not hasattr(pkg, 'files'):
|
||||||
|
+ continue
|
||||||
|
clen = info.get("Content-Length")
|
||||||
|
if clen is not None:
|
||||||
|
clen = int(clen)
|
||||||
|
cmd5 = info.get("Content-MD5")
|
||||||
|
if cmd5 is not None:
|
||||||
|
cmd5 = cmd5.lower()
|
||||||
|
- if (clen is not None or cmd5 is not None) \
|
||||||
|
- and hasattr(pkg, 'files'):
|
||||||
|
+ if clen is not None or cmd5 is not None:
|
||||||
|
# Not using path from urlparse results to match how
|
||||||
|
# rpm itself parses the basename.
|
||||||
|
pkgfile = pkg.files()[url.split("/")[-1]]
|
11
rpmlint.spec
11
rpmlint.spec
@ -1,6 +1,6 @@
|
|||||||
Name: rpmlint
|
Name: rpmlint
|
||||||
Version: 1.1
|
Version: 1.1
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
Summary: Tool for checking common errors in RPM packages
|
Summary: Tool for checking common errors in RPM packages
|
||||||
|
|
||||||
Group: Development/Tools
|
Group: Development/Tools
|
||||||
@ -16,6 +16,11 @@ Source4: %{name}.config.el4
|
|||||||
Source5: %{name}.config.el5
|
Source5: %{name}.config.el5
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
|
|
||||||
|
# Don't try to check Content-Length and Content-MD5 for invalid Source URLs
|
||||||
|
# http://rpmlint.zarb.org/cgi-bin/trac.cgi/changeset/1836
|
||||||
|
# https://bugzilla.redhat.com/show_bug.cgi?id=680781
|
||||||
|
Patch0: rpmlint-1.1-changeset1836.patch
|
||||||
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
BuildRequires: python >= 2.4
|
BuildRequires: python >= 2.4
|
||||||
BuildRequires: rpm-python >= 4.4
|
BuildRequires: rpm-python >= 4.4
|
||||||
@ -43,6 +48,7 @@ and source packages as well as spec files can be checked.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
|
%patch0 -p1 -b .1836
|
||||||
sed -i -e /MenuCheck/d Config.py
|
sed -i -e /MenuCheck/d Config.py
|
||||||
cp -p config config.example
|
cp -p config config.example
|
||||||
install -pm 644 %{SOURCE2} CHANGES.package.old
|
install -pm 644 %{SOURCE2} CHANGES.package.old
|
||||||
@ -89,6 +95,9 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Mar 3 2011 Tom Callaway <spot@fedoraproject.org> - 1.1-2
|
||||||
|
- apply upstream fix for source url aborts (bz 680781)
|
||||||
|
|
||||||
* Fri Feb 4 2011 Tom Callaway <spot@fedoraproject.org> - 1.1-1
|
* Fri Feb 4 2011 Tom Callaway <spot@fedoraproject.org> - 1.1-1
|
||||||
- update to 1.1
|
- update to 1.1
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user