[Yum-devel] [PATCH 2/2] Simplify re_full_search_needed "primary" regex.

Ville Skyttä ville.skytta at iki.fi
Wed Oct 28 21:20:09 UTC 2009


---
 yum/misc.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/yum/misc.py b/yum/misc.py
index a689b16..3e86d08 100644
--- a/yum/misc.py
+++ b/yum/misc.py
@@ -115,8 +115,8 @@ def re_full_search_needed(s):
     """ Tests if a string needs a full nevra match, instead of just name. """
     global _re_compiled_full_match
     if _re_compiled_full_match is None:
-        # A glob, or a "." or "-" separator
-        one = re.compile('.*([-.*?]|\[.+\]).*.$').match
+        # A glob, or a "." or "-" separator, followed by something (the ".")
+        one = re.compile('.*([-.*?]|\[.+\]).').match
         # Any epoch, for envra
         two = re.compile('[0-9]+:').match
         _re_compiled_full_match = (one, two)
-- 
1.6.2.5



More information about the Yum-devel mailing list