- Apply upstream patch to fix spec file check with rpm >= 4.8.0.

This commit is contained in:
Ville Skyttä 2010-01-25 23:11:37 +00:00
parent 54cb46a0ce
commit 43fef61643
2 changed files with 26 additions and 1 deletions

View File

@ -0,0 +1,19 @@
Index: SpecCheck.py
===================================================================
--- SpecCheck.py (revision 1719)
+++ SpecCheck.py (working copy)
@@ -526,7 +526,13 @@
# errors logged above already
pass
if spec_obj:
- for src in spec_obj.sources():
+ try:
+ # rpm < 4.8.0
+ sources = spec_obj.sources()
+ except TypeError:
+ # rpm >= 4.8.0
+ sources = spec_obj.sources
+ for src in sources:
(url, num, flags) = src
(scheme, netloc) = urlparse(url)[0:2]
if flags & 1: # rpmspec.h, rpm.org ticket #123

View File

@ -1,6 +1,6 @@
Name: rpmlint
Version: 0.93
Release: 1%{?dist}
Release: 2%{?dist}
Summary: Tool for checking common errors in RPM packages
Group: Development/Tools
@ -10,6 +10,8 @@ Source0: http://rpmlint.zarb.org/download/%{name}-%{version}.tar.bz2
Source1: %{name}.config
Source2: %{name}-CHANGES.package.old
Source3: %{name}-etc.config
# Upstream post-0.93
Patch0: %{name}-0.93-rpm-4.8.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
@ -39,6 +41,7 @@ and source packages as well as spec files can be checked.
%prep
%setup -q
%patch0
sed -i -e /MenuCheck/d Config.py
cp -p config config.example
install -pm 644 %{SOURCE2} CHANGES.package.old
@ -78,6 +81,9 @@ rm -rf $RPM_BUILD_ROOT
%changelog
* Tue Jan 26 2010 Ville Skyttä <ville.skytta@iki.fi> - 0.93-2
- Apply upstream patch to fix spec file check with rpm >= 4.8.0.
* Mon Jan 25 2010 Ville Skyttä <ville.skytta@iki.fi> - 0.93-1
- Update to 0.93; fixes #531102 and #555284.
- Enable checks requiring network access in default config.