summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2017-04-03 11:19:06 +1200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-04-05 23:19:17 +0100
commit2d704e445c220be1793570bfeaa95619676f1f19 (patch)
treed6eb83d56f8fb7282f489fb182dc361eb13928fe /bitbake
parent1fe95cfc1261c999389de00e56642252ec2f0c75 (diff)
downloadpoky-2d704e445c220be1793570bfeaa95619676f1f19.tar.gz
bitbake: codeparser: add some comments
Add a few comments at the top of the file explaining what it's for, and a comment pointing out that you need to increment the cache version when changing any code that changes the output. (Bitbake rev: c1780bc1872bb35bc28c76eff9110717f02d9db2) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/codeparser.py23
1 files changed, 23 insertions, 0 deletions
diff --git a/bitbake/lib/bb/codeparser.py b/bitbake/lib/bb/codeparser.py
index f76b478a47..530f44e578 100644
--- a/bitbake/lib/bb/codeparser.py
+++ b/bitbake/lib/bb/codeparser.py
@@ -1,3 +1,22 @@
1"""
2BitBake code parser
3
4Parses actual code (i.e. python and shell) for functions and in-line
5expressions. Used mainly to determine dependencies on other functions
6and variables within the BitBake metadata. Also provides a cache for
7this information in order to speed up processing.
8
9(Not to be confused with the code that parses the metadata itself,
10see lib/bb/parse/ for that).
11
12NOTE: if you change how the parsers gather information you will almost
13certainly need to increment CodeParserCache.CACHE_VERSION below so that
14any existing codeparser cache gets invalidated. Additionally you'll need
15to increment __cache_version__ in cache.py in order to ensure that old
16recipe caches don't trigger "Taskhash mismatch" errors.
17
18"""
19
1import ast 20import ast
2import sys 21import sys
3import codegen 22import codegen
@@ -117,6 +136,10 @@ class shellCacheLine(object):
117 136
118class CodeParserCache(MultiProcessCache): 137class CodeParserCache(MultiProcessCache):
119 cache_file_name = "bb_codeparser.dat" 138 cache_file_name = "bb_codeparser.dat"
139 # NOTE: you must increment this if you change how the parsers gather information,
140 # so that an existing cache gets invalidated. Additionally you'll need
141 # to increment __cache_version__ in cache.py in order to ensure that old
142 # recipe caches don't trigger "Taskhash mismatch" errors.
120 CACHE_VERSION = 9 143 CACHE_VERSION = 9
121 144
122 def __init__(self): 145 def __init__(self):