summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/parse/parse_py/ConfHandler.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb/parse/parse_py/ConfHandler.py')
-rw-r--r--bitbake/lib/bb/parse/parse_py/ConfHandler.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/bitbake/lib/bb/parse/parse_py/ConfHandler.py b/bitbake/lib/bb/parse/parse_py/ConfHandler.py
index fa811f3828..6f77bd4201 100644
--- a/bitbake/lib/bb/parse/parse_py/ConfHandler.py
+++ b/bitbake/lib/bb/parse/parse_py/ConfHandler.py
@@ -71,6 +71,14 @@ def include(oldfn, fn, lineno, data, error_out):
71 raise ParseError("Could not %(error_out)s file %(fn)s" % vars(), oldfn, lineno) 71 raise ParseError("Could not %(error_out)s file %(fn)s" % vars(), oldfn, lineno)
72 logger.debug(2, "CONF file '%s' not found", fn) 72 logger.debug(2, "CONF file '%s' not found", fn)
73 73
74# We have an issue where a UI might want to enforce particular settings such as
75# an empty DISTRO variable. If configuration files do something like assigning
76# a weak default, it turns out to be very difficult to filter out these changes,
77# particularly when the weak default might appear half way though parsing a chain
78# of configuration files. We therefore let the UIs hook into configuration file
79# parsing. This turns out to be a hard problem to solve any other way.
80confFilters = []
81
74def handle(fn, data, include): 82def handle(fn, data, include):
75 init(data) 83 init(data)
76 84
@@ -107,6 +115,9 @@ def handle(fn, data, include):
107 if oldfile: 115 if oldfile:
108 data.setVar('FILE', oldfile) 116 data.setVar('FILE', oldfile)
109 117
118 for f in confFilters:
119 f(fn, data)
120
110 return data 121 return data
111 122
112def feeder(lineno, s, fn, statements): 123def feeder(lineno, s, fn, statements):