- Apply a patch from upstream to fix development filtering.

This commit is contained in:
Richard Hughes 2008-10-28 12:36:00 +00:00
parent 9156f743c0
commit 3174f63558
2 changed files with 36 additions and 1 deletions

View File

@ -8,7 +8,7 @@
Summary: System daemon that is a DBUS abstraction layer for package management
Name: PackageKit
Version: 0.3.9
Release: 1%{?dist}
Release: 2%{?dist}
License: GPLv2+
Group: System Environment/Libraries
URL: http://packagekit.freedesktop.org
@ -19,6 +19,9 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
# Set Vendor.conf up for Fedora.
Patch0: PackageKit-0.3.8-Fedora-Vendor.conf.patch
# upstream, 99f995788473f4627acb7447aa467a61bc61893a
Patch1: pk-yum-fix-devel-filtering.patch
Requires: dbus >= %{dbus_version}
Requires: dbus-glib >= %{dbus_glib_version}
Requires: PackageKit-glib = %{version}-%{release}
@ -200,6 +203,7 @@ codecs from configured repositories using PackageKit.
%prep
%setup -q
%patch0 -p1
%patch1 -p1
%build
%configure --enable-yum --enable-smart --with-default-backend=yum --disable-local
@ -372,6 +376,9 @@ update-mime-database %{_datadir}/mime &> /dev/null || :
%{_includedir}/PackageKit/backend/*.h
%changelog
* Tue Oct 28 2008 Richard Hughes <rhughes@redhat.com> - 0.3.9-2
- Apply a patch from upstream to fix development filtering.
* Mon Oct 27 2008 Richard Hughes <rhughes@redhat.com> - 0.3.9-1
- New upstream version
- Many new and updated translations.

View File

@ -0,0 +1,28 @@
commit 99f995788473f4627acb7447aa467a61bc61893a
Author: Richard Hughes <richard@hughsie.com>
Date: Tue Oct 28 12:31:29 2008 +0000
yum: replace the regular expression with four simple comparisons
diff --git a/backends/yum/yumFilter.py b/backends/yum/yumFilter.py
index 9e1b563..855a51f 100644
--- a/backends/yum/yumFilter.py
+++ b/backends/yum/yumFilter.py
@@ -120,8 +120,15 @@ class YumFilter(PackagekitFilter):
'''
Return if the package is development.
'''
- regex = re.compile(r'(-devel)|(-debuginfo)|(-static)|(-libs)')
- return regex.search(pkg.name)
+ if pkg.name.endswith('-devel'):
+ return True
+ if pkg.name.endswith('-debuginfo'):
+ return True
+ if pkg.name.endswith('-static'):
+ return True
+ if pkg.name.endswith('-libs'):
+ return True
+ return False
def _pkg_is_gui(self, pkg):
'''