aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bb/taskdata.py
diff options
context:
space:
mode:
authorGuo Hongruan <camelguo@gmail.com>2009-12-15 17:10:13 +0800
committerHolger Hans Peter Freyther <zecke@selfish.org>2009-12-24 13:43:32 +0100
commitefb0474231ed286073a5a5904094320da8cab28d (patch)
tree5d6e190f2efb574c5a4e53fb0f1f08626c3c2606 /lib/bb/taskdata.py
parent7291af8802cbe0f68487848618266c76598e2cff (diff)
downloadbitbake-efb0474231ed286073a5a5904094320da8cab28d.tar.gz
Enable --ignore-deps options to access regular expression string
1. Add a function named re_match_strings(target,strings), to match target using the string in strings which can be regular expression
Diffstat (limited to 'lib/bb/taskdata.py')
-rw-r--r--lib/bb/taskdata.py21
1 files changed, 17 insertions, 4 deletions
diff --git a/lib/bb/taskdata.py b/lib/bb/taskdata.py
index 73ec2aa75..74536a711 100644
--- a/lib/bb/taskdata.py
+++ b/lib/bb/taskdata.py
@@ -25,6 +25,19 @@ Task data collection and handling
import bb
+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
+ """
+ import re
+
+ for name in strings:
+ if (name==target or
+ re.search(name,target)!=None):
+ return True
+ return False
+
class TaskData:
"""
BitBake Task Data implementation
@@ -261,7 +274,7 @@ class TaskData:
"""
unresolved = []
for target in self.build_names_index:
- if target in dataCache.ignored_dependencies:
+ if re_match_strings(target, dataCache.ignored_dependencies):
continue
if self.build_names_index.index(target) in self.failed_deps:
continue
@@ -276,7 +289,7 @@ class TaskData:
"""
unresolved = []
for target in self.run_names_index:
- if target in dataCache.ignored_dependencies:
+ if re_match_strings(target, dataCache.ignored_dependencies):
continue
if self.run_names_index.index(target) in self.failed_rdeps:
continue
@@ -356,7 +369,7 @@ class TaskData:
added internally during dependency resolution
"""
- if item in dataCache.ignored_dependencies:
+ if re_match_strings(item, dataCache.ignored_dependencies):
return
if not item in dataCache.providers:
@@ -407,7 +420,7 @@ class TaskData:
(takes item names from RDEPENDS/PACKAGES namespace)
"""
- if item in dataCache.ignored_dependencies:
+ if re_match_strings(item, dataCache.ignored_dependencies):
return
if self.have_runtime_target(item):