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):
'''