diff options
Diffstat (limited to 'bitbake/lib/bb/parse/parse_py/ConfHandler.py')
-rw-r--r-- | bitbake/lib/bb/parse/parse_py/ConfHandler.py | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/bitbake/lib/bb/parse/parse_py/ConfHandler.py b/bitbake/lib/bb/parse/parse_py/ConfHandler.py index 451e68dd66..3076067287 100644 --- a/bitbake/lib/bb/parse/parse_py/ConfHandler.py +++ b/bitbake/lib/bb/parse/parse_py/ConfHandler.py | |||
@@ -46,6 +46,7 @@ __require_regexp__ = re.compile( r"require\s+(.+)" ) | |||
46 | __export_regexp__ = re.compile( r"export\s+([a-zA-Z0-9\-_+.${}/~]+)$" ) | 46 | __export_regexp__ = re.compile( r"export\s+([a-zA-Z0-9\-_+.${}/~]+)$" ) |
47 | __unset_regexp__ = re.compile( r"unset\s+([a-zA-Z0-9\-_+.${}/~]+)$" ) | 47 | __unset_regexp__ = re.compile( r"unset\s+([a-zA-Z0-9\-_+.${}/~]+)$" ) |
48 | __unset_flag_regexp__ = re.compile( r"unset\s+([a-zA-Z0-9\-_+.${}/~]+)\[([a-zA-Z0-9\-_+.]+)\]$" ) | 48 | __unset_flag_regexp__ = re.compile( r"unset\s+([a-zA-Z0-9\-_+.${}/~]+)\[([a-zA-Z0-9\-_+.]+)\]$" ) |
49 | __addpylib_regexp__ = re.compile(r"addpylib\s+(.+)\s+(.+)" ) | ||
49 | 50 | ||
50 | def init(data): | 51 | def init(data): |
51 | return | 52 | return |
@@ -107,7 +108,7 @@ def include_single_file(parentfn, fn, lineno, data, error_out): | |||
107 | # parsing. This turns out to be a hard problem to solve any other way. | 108 | # parsing. This turns out to be a hard problem to solve any other way. |
108 | confFilters = [] | 109 | confFilters = [] |
109 | 110 | ||
110 | def handle(fn, data, include): | 111 | def handle(fn, data, include, baseconfig=False): |
111 | init(data) | 112 | init(data) |
112 | 113 | ||
113 | if include == 0: | 114 | if include == 0: |
@@ -144,7 +145,7 @@ def handle(fn, data, include): | |||
144 | # skip comments | 145 | # skip comments |
145 | if s[0] == '#': | 146 | if s[0] == '#': |
146 | continue | 147 | continue |
147 | feeder(lineno, s, abs_fn, statements) | 148 | feeder(lineno, s, abs_fn, statements, baseconfig=baseconfig) |
148 | 149 | ||
149 | # DONE WITH PARSING... time to evaluate | 150 | # DONE WITH PARSING... time to evaluate |
150 | data.setVar('FILE', abs_fn) | 151 | data.setVar('FILE', abs_fn) |
@@ -157,7 +158,9 @@ def handle(fn, data, include): | |||
157 | 158 | ||
158 | return data | 159 | return data |
159 | 160 | ||
160 | def feeder(lineno, s, fn, statements): | 161 | # baseconfig is set for the bblayers/layer.conf cookerdata config parsing |
162 | # The function is also used by BBHandler, conffile would be False | ||
163 | def feeder(lineno, s, fn, statements, baseconfig=False, conffile=True): | ||
161 | m = __config_regexp__.match(s) | 164 | m = __config_regexp__.match(s) |
162 | if m: | 165 | if m: |
163 | groupd = m.groupdict() | 166 | groupd = m.groupdict() |
@@ -189,6 +192,11 @@ def feeder(lineno, s, fn, statements): | |||
189 | ast.handleUnsetFlag(statements, fn, lineno, m) | 192 | ast.handleUnsetFlag(statements, fn, lineno, m) |
190 | return | 193 | return |
191 | 194 | ||
195 | m = __addpylib_regexp__.match(s) | ||
196 | if baseconfig and conffile and m: | ||
197 | ast.handlePyLib(statements, fn, lineno, m) | ||
198 | return | ||
199 | |||
192 | raise ParseError("unparsed line: '%s'" % s, fn, lineno); | 200 | raise ParseError("unparsed line: '%s'" % s, fn, lineno); |
193 | 201 | ||
194 | # Add us to the handlers list | 202 | # Add us to the handlers list |