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