diff options
| author | Richard Purdie <rpurdie@linux.intel.com> | 2010-02-12 14:41:28 +0000 |
|---|---|---|
| committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-02-15 17:07:20 +0000 |
| commit | 269d4d58a924ba34b0f4cfa8bc9dce948a79e2ef (patch) | |
| tree | 1400d4fc5a29b09a9a077a323aaecdeec8699c1c /bitbake/lib/bb/parse/ast.py | |
| parent | 71a19386a36931c2e8cd882bb19c33ace60e4398 (diff) | |
| download | poky-269d4d58a924ba34b0f4cfa8bc9dce948a79e2ef.tar.gz | |
bitbake: [parser] Preserve include vs. require behaviour
(Bitbake rev: 6073a5b8e4ca8af8e1a8e0234fad7b08baf76c99)
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'bitbake/lib/bb/parse/ast.py')
| -rw-r--r-- | bitbake/lib/bb/parse/ast.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/bitbake/lib/bb/parse/ast.py b/bitbake/lib/bb/parse/ast.py index b6dadd1e2a..55bf847d1b 100644 --- a/bitbake/lib/bb/parse/ast.py +++ b/bitbake/lib/bb/parse/ast.py | |||
| @@ -40,10 +40,11 @@ class StatementGroup: | |||
| 40 | map(lambda x: x.eval(data), self.statements) | 40 | map(lambda x: x.eval(data), self.statements) |
| 41 | 41 | ||
| 42 | class IncludeNode: | 42 | class IncludeNode: |
| 43 | def __init__(self, what_file, fn, lineno): | 43 | def __init__(self, what_file, fn, lineno, force): |
| 44 | self.what_file = what_file | 44 | self.what_file = what_file |
| 45 | self.from_fn = fn | 45 | self.from_fn = fn |
| 46 | self.from_lineno = lineno | 46 | self.from_lineno = lineno |
| 47 | self.force = force | ||
| 47 | 48 | ||
| 48 | def eval(self, data): | 49 | def eval(self, data): |
| 49 | """ | 50 | """ |
| @@ -54,7 +55,10 @@ class IncludeNode: | |||
| 54 | 55 | ||
| 55 | # TODO: Cache those includes... | 56 | # TODO: Cache those includes... |
| 56 | statements = StatementGroup() | 57 | statements = StatementGroup() |
| 57 | bb.parse.ConfHandler.include(statements, self.from_fn, s, data, False) | 58 | if force: |
| 59 | bb.parse.ConfHandler.include(statements, self.from_fn, s, data, "include required") | ||
| 60 | else: | ||
| 61 | bb.parse.ConfHandler.include(statements, self.from_fn, s, data, False) | ||
| 58 | statements.eval(data) | 62 | statements.eval(data) |
| 59 | 63 | ||
| 60 | class ExportNode: | 64 | class ExportNode: |
| @@ -107,7 +111,7 @@ class DataNode: | |||
| 107 | 111 | ||
| 108 | def handleInclude(statements, m, fn, lineno, data, force): | 112 | def handleInclude(statements, m, fn, lineno, data, force): |
| 109 | # AST handling | 113 | # AST handling |
| 110 | statements.append(IncludeNode(m.group(1), fn, lineno)) | 114 | statements.append(IncludeNode(m.group(1), fn, lineno, force)) |
| 111 | 115 | ||
| 112 | s = bb.data.expand(m.group(1), data) | 116 | s = bb.data.expand(m.group(1), data) |
| 113 | bb.msg.debug(3, bb.msg.domain.Parsing, "CONF %s:%d: including %s" % (fn, lineno, s)) | 117 | bb.msg.debug(3, bb.msg.domain.Parsing, "CONF %s:%d: including %s" % (fn, lineno, s)) |
