diff options
| -rw-r--r-- | bitbake/lib/bb/codeparser.py | 23 |
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 | """ | ||
| 2 | BitBake code parser | ||
| 3 | |||
| 4 | Parses actual code (i.e. python and shell) for functions and in-line | ||
| 5 | expressions. Used mainly to determine dependencies on other functions | ||
| 6 | and variables within the BitBake metadata. Also provides a cache for | ||
| 7 | this information in order to speed up processing. | ||
| 8 | |||
| 9 | (Not to be confused with the code that parses the metadata itself, | ||
| 10 | see lib/bb/parse/ for that). | ||
| 11 | |||
| 12 | NOTE: if you change how the parsers gather information you will almost | ||
| 13 | certainly need to increment CodeParserCache.CACHE_VERSION below so that | ||
| 14 | any existing codeparser cache gets invalidated. Additionally you'll need | ||
| 15 | to increment __cache_version__ in cache.py in order to ensure that old | ||
| 16 | recipe caches don't trigger "Taskhash mismatch" errors. | ||
| 17 | |||
| 18 | """ | ||
| 19 | |||
| 1 | import ast | 20 | import ast |
| 2 | import sys | 21 | import sys |
| 3 | import codegen | 22 | import codegen |
| @@ -117,6 +136,10 @@ class shellCacheLine(object): | |||
| 117 | 136 | ||
| 118 | class CodeParserCache(MultiProcessCache): | 137 | class 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): |
