summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/parse/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb/parse/__init__.py')
-rw-r--r--bitbake/lib/bb/parse/__init__.py14
1 files changed, 12 insertions, 2 deletions
diff --git a/bitbake/lib/bb/parse/__init__.py b/bitbake/lib/bb/parse/__init__.py
index c01807ba87..a4358f1374 100644
--- a/bitbake/lib/bb/parse/__init__.py
+++ b/bitbake/lib/bb/parse/__init__.py
@@ -60,6 +60,14 @@ def cached_mtime_noerror(f):
return 0
return __mtime_cache[f]
+def check_mtime(f, mtime):
+ try:
+ current_mtime = os.stat(f)[stat.ST_MTIME]
+ __mtime_cache[f] = current_mtime
+ except OSError:
+ current_mtime = 0
+ return current_mtime == mtime
+
def update_mtime(f):
try:
__mtime_cache[f] = os.stat(f)[stat.ST_MTIME]
@@ -99,12 +107,12 @@ def supports(fn, data):
return 1
return 0
-def handle(fn, data, include = 0):
+def handle(fn, data, include=0, baseconfig=False):
"""Call the handler that is appropriate for this file"""
for h in handlers:
if h['supports'](fn, data):
with data.inchistory.include(fn):
- return h['handle'](fn, data, include)
+ return h['handle'](fn, data, include, baseconfig)
raise ParseError("not a BitBake file", fn)
def init(fn, data):
@@ -113,6 +121,8 @@ def init(fn, data):
return h['init'](data)
def init_parser(d):
+ if hasattr(bb.parse, "siggen"):
+ bb.parse.siggen.exit()
bb.parse.siggen = bb.siggen.init(d)
def resolve_file(fn, d):