]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
cooker: use re match, not search in re_match_strings
authorChris Larson <chris_larson@mentor.com>
Tue, 23 Nov 2010 22:30:45 +0000 (15:30 -0700)
committerChris Larson <chris_larson@mentor.com>
Thu, 9 Dec 2010 05:24:20 +0000 (22:24 -0700)
We want to match the requested pattern at the beginning of the string,
otherwise things behave in an unintuitive manner wrt ASSUME_PROVIDED (e.g.
ASSUME_PROVIDED += "gtk+" will also assume foo-gtk+ is provided), and the user
can always use '.*gtk+' to get the old behavior.

Signed-off-by: Chris Larson <chris_larson@mentor.com>
lib/bb/taskdata.py

index d2a350578739fd339c8ff20a6d4715cb51ae23fe..81a42b7b533c17833ed0d3af43d1d11acd3f1aef 100644 (file)
@@ -34,7 +34,7 @@ def re_match_strings(target, strings):
     Whether or not the string 'target' matches
     any one string of the strings which can be regular expression string
     """
-    return any(name == target or re.search(name, target) != None
+    return any(name == target or re.match(name, target)
                for name in strings)
 
 class TaskData: