]> code.ossystems Code Review - openembedded-core.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)
committerRichard Purdie <rpurdie@linux.intel.com>
Tue, 4 Jan 2011 14:46:47 +0000 (14:46 +0000)
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.

(Bitbake rev: 5670134ab2eb573d39df3c3231677cdb1a1dfc72)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
bitbake/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: