summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/cooker.py
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2012-05-23 00:23:32 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-05-23 11:35:04 +0100
commit8b8be74ed21b878b2fe30d5b76ff0648e6e48c18 (patch)
treef1facae6d6803b450185811ca08bf215d6963530 /bitbake/lib/bb/cooker.py
parentd7b818b51f3e6dded0c0885cdfed5a24cda3b428 (diff)
downloadpoky-8b8be74ed21b878b2fe30d5b76ff0648e6e48c18.tar.gz
bitbake: implement checksums for local files in SRC_URI
Gathers a list of paths to have checksums calculated at parse time, and processes these when calculating task hashes. Checksums are cached with the file's current mtime. Thus, changing any local file in SRC_URI will now cause the do_fetch taskhash to change, thus forcing a rebuild. This change adds very roughly about an 8% increase in parse time (a few seconds) and maybe a few seconds during runqueue generation, so a fairly moderate performance hit. Note that since paths are resolved at parse time, this will not force a rebuild when files are introduced which would cause that resolved path to be different - for example, where a machine-specific version of a file was added without otherwise changing the recipe. This will need to be handled in a future update. Code to hook this into the signature generator was courtesy of Richard Purdie <richard.purdie@linuxfoundation.org>. Implements [YOCTO #2044]. (Bitbake rev: c993b7c457f8b7776e8a5dff253bfa0724bc2cae) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/cooker.py')
-rw-r--r--bitbake/lib/bb/cooker.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index dea0aadbee..8ad4922651 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -1570,6 +1570,7 @@ class CookerParser(object):
1570 def init(): 1570 def init():
1571 Parser.cfg = self.cfgdata 1571 Parser.cfg = self.cfgdata
1572 multiprocessing.util.Finalize(None, bb.codeparser.parser_cache_save, args=(self.cfgdata,), exitpriority=1) 1572 multiprocessing.util.Finalize(None, bb.codeparser.parser_cache_save, args=(self.cfgdata,), exitpriority=1)
1573 multiprocessing.util.Finalize(None, bb.fetch.fetcher_parse_save, args=(self.cfgdata,), exitpriority=1)
1573 1574
1574 self.feeder_quit = multiprocessing.Queue(maxsize=1) 1575 self.feeder_quit = multiprocessing.Queue(maxsize=1)
1575 self.parser_quit = multiprocessing.Queue(maxsize=self.num_processes) 1576 self.parser_quit = multiprocessing.Queue(maxsize=self.num_processes)
@@ -1618,6 +1619,7 @@ class CookerParser(object):
1618 sync.start() 1619 sync.start()
1619 multiprocessing.util.Finalize(None, sync.join, exitpriority=-100) 1620 multiprocessing.util.Finalize(None, sync.join, exitpriority=-100)
1620 bb.codeparser.parser_cache_savemerge(self.cooker.configuration.data) 1621 bb.codeparser.parser_cache_savemerge(self.cooker.configuration.data)
1622 bb.fetch.fetcher_parse_done(self.cooker.configuration.data)
1621 1623
1622 def load_cached(self): 1624 def load_cached(self):
1623 for filename, appends in self.fromcache: 1625 for filename, appends in self.fromcache: