diff options
| author | Richard Purdie <rpurdie@linux.intel.com> | 2010-07-16 15:10:22 +0100 |
|---|---|---|
| committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-07-16 15:10:40 +0100 |
| commit | 63e6ba85677b8aa9f4cf9942a1fccbb8a8c72660 (patch) | |
| tree | 56be00c10b229ddc5e63bf1f02d7ac5c23ba8381 /bitbake/lib/bb/cache.py | |
| parent | c4fde248b14d4be9cab6d0eff85f9d7f852a4b65 (diff) | |
| download | poky-63e6ba85677b8aa9f4cf9942a1fccbb8a8c72660.tar.gz | |
bitbake: Add support for .bbappend files (see mailing lists for detais)
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'bitbake/lib/bb/cache.py')
| -rw-r--r-- | bitbake/lib/bb/cache.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/bitbake/lib/bb/cache.py b/bitbake/lib/bb/cache.py index da4546640a..b5c7043c64 100644 --- a/bitbake/lib/bb/cache.py +++ b/bitbake/lib/bb/cache.py | |||
| @@ -165,7 +165,7 @@ class Cache: | |||
| 165 | #bb.msg.debug(2, bb.msg.domain.Cache, "realfn2virtual %s and %s to %s" % (realfn, cls, "virtual:" + cls + ":" + realfn)) | 165 | #bb.msg.debug(2, bb.msg.domain.Cache, "realfn2virtual %s and %s to %s" % (realfn, cls, "virtual:" + cls + ":" + realfn)) |
| 166 | return "virtual:" + cls + ":" + realfn | 166 | return "virtual:" + cls + ":" + realfn |
| 167 | 167 | ||
| 168 | def loadDataFull(self, virtualfn, cfgData): | 168 | def loadDataFull(self, virtualfn, appends, cfgData): |
| 169 | """ | 169 | """ |
| 170 | Return a complete set of data for fn. | 170 | Return a complete set of data for fn. |
| 171 | To do this, we need to parse the file. | 171 | To do this, we need to parse the file. |
| @@ -175,10 +175,10 @@ class Cache: | |||
| 175 | 175 | ||
| 176 | bb.msg.debug(1, bb.msg.domain.Cache, "Parsing %s (full)" % fn) | 176 | bb.msg.debug(1, bb.msg.domain.Cache, "Parsing %s (full)" % fn) |
| 177 | 177 | ||
| 178 | bb_data = self.load_bbfile(fn, cfgData) | 178 | bb_data = self.load_bbfile(fn, appends, cfgData) |
| 179 | return bb_data[cls] | 179 | return bb_data[cls] |
| 180 | 180 | ||
| 181 | def loadData(self, fn, cfgData, cacheData): | 181 | def loadData(self, fn, appends, cfgData, cacheData): |
| 182 | """ | 182 | """ |
| 183 | Load a subset of data for fn. | 183 | Load a subset of data for fn. |
| 184 | If the cached data is valid we do nothing, | 184 | If the cached data is valid we do nothing, |
| @@ -206,7 +206,7 @@ class Cache: | |||
| 206 | 206 | ||
| 207 | bb.msg.debug(1, bb.msg.domain.Cache, "Parsing %s" % fn) | 207 | bb.msg.debug(1, bb.msg.domain.Cache, "Parsing %s" % fn) |
| 208 | 208 | ||
| 209 | bb_data = self.load_bbfile(fn, cfgData) | 209 | bb_data = self.load_bbfile(fn, appends, cfgData) |
| 210 | 210 | ||
| 211 | for data in bb_data: | 211 | for data in bb_data: |
| 212 | virtualfn = self.realfn2virtual(fn, data) | 212 | virtualfn = self.realfn2virtual(fn, data) |
| @@ -439,7 +439,7 @@ class Cache: | |||
| 439 | self.getVar('__BB_DONT_CACHE', file_name, True) | 439 | self.getVar('__BB_DONT_CACHE', file_name, True) |
| 440 | self.getVar('__VARIANTS', file_name, True) | 440 | self.getVar('__VARIANTS', file_name, True) |
| 441 | 441 | ||
| 442 | def load_bbfile( self, bbfile, config): | 442 | def load_bbfile(self, bbfile, appends, config): |
| 443 | """ | 443 | """ |
| 444 | Load and parse one .bb build file | 444 | Load and parse one .bb build file |
| 445 | Return the data and whether parsing resulted in the file being skipped | 445 | Return the data and whether parsing resulted in the file being skipped |
| @@ -463,6 +463,8 @@ class Cache: | |||
| 463 | chdir_back = True | 463 | chdir_back = True |
| 464 | data.setVar('TOPDIR', bbfile_loc, bb_data) | 464 | data.setVar('TOPDIR', bbfile_loc, bb_data) |
| 465 | try: | 465 | try: |
| 466 | if appends: | ||
| 467 | data.setVar('__BBAPPEND', " ".join(appends), bb_data) | ||
| 466 | bb_data = parse.handle(bbfile, bb_data) # read .bb data | 468 | bb_data = parse.handle(bbfile, bb_data) # read .bb data |
| 467 | if chdir_back: os.chdir(oldpath) | 469 | if chdir_back: os.chdir(oldpath) |
| 468 | return bb_data | 470 | return bb_data |
