소스 검색

cooker: use re match, not search in re_match_strings

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>
Chris Larson 14 년 전
부모
커밋
72c6953488
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      bitbake/lib/bb/taskdata.py

+ 1 - 1
bitbake/lib/bb/taskdata.py

@@ -34,7 +34,7 @@ def re_match_strings(target, strings):
     Whether or not the string 'target' matches
     Whether or not the string 'target' matches
     any one string of the strings which can be regular expression string
     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)
                for name in strings)
 
 
 class TaskData:
 class TaskData: