summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2008-09-30 21:54:47 +0000
committerRichard Purdie <richard@openedhand.com>2008-09-30 21:54:47 +0000
commit979f987c44928f2d47d319cf5fc34e7f3d2113b7 (patch)
treeb49dca768f15cc67c1fa2ff499552a2c67baa7c1 /bitbake
parente2d321075a6c1aecd09a705d97f2347863a685f9 (diff)
downloadpoky-979f987c44928f2d47d319cf5fc34e7f3d2113b7.tar.gz
bitbake cache.py: When SRCREV autorevisioning for a recipe is in use, don't cache the recipe. Based on work from Heikki Paajanen
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@5352 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/ChangeLog1
-rw-r--r--bitbake/lib/bb/cache.py11
-rw-r--r--bitbake/lib/bb/fetch/__init__.py2
3 files changed, 13 insertions, 1 deletions
diff --git a/bitbake/ChangeLog b/bitbake/ChangeLog
index ceb7e648b7..2d50c0e364 100644
--- a/bitbake/ChangeLog
+++ b/bitbake/ChangeLog
@@ -59,6 +59,7 @@ Changes in BitBake 1.8.x:
59 all variable from the environment. If BB_ENV_WHITELIST is set, that whitelist will be 59 all variable from the environment. If BB_ENV_WHITELIST is set, that whitelist will be
60 used instead of the internal bitbake one. Alternatively, BB_ENV_EXTRAWHITE can be used 60 used instead of the internal bitbake one. Alternatively, BB_ENV_EXTRAWHITE can be used
61 to extend the internal whitelist. 61 to extend the internal whitelist.
62 - When SRCREV autorevisioning for a recipe is in use, don't cache the recipe
62 63
63Changes in BitBake 1.8.10: 64Changes in BitBake 1.8.10:
64 - Psyco is available only for x86 - do not use it on other architectures. 65 - Psyco is available only for x86 - do not use it on other architectures.
diff --git a/bitbake/lib/bb/cache.py b/bitbake/lib/bb/cache.py
index fe38ea0aee..e0ba1de38e 100644
--- a/bitbake/lib/bb/cache.py
+++ b/bitbake/lib/bb/cache.py
@@ -259,6 +259,7 @@ class Cache:
259 Save the cache 259 Save the cache
260 Called from the parser when complete (or exiting) 260 Called from the parser when complete (or exiting)
261 """ 261 """
262 import copy
262 263
263 if not self.has_cache: 264 if not self.has_cache:
264 return 265 return
@@ -271,8 +272,14 @@ class Cache:
271 version_data['CACHE_VER'] = __cache_version__ 272 version_data['CACHE_VER'] = __cache_version__
272 version_data['BITBAKE_VER'] = bb.__version__ 273 version_data['BITBAKE_VER'] = bb.__version__
273 274
275 cache_data = copy.deepcopy(self.depends_cache)
276 for fn in self.depends_cache:
277 if '__BB_DONT_CACHE' in self.depends_cache[fn] and self.depends_cache[fn]['__BB_DONT_CACHE']:
278 bb.msg.debug(2, bb.msg.domain.Cache, "Not caching %s, marked as not cacheable" % fn)
279 del cache_data[fn]
280
274 p = pickle.Pickler(file(self.cachefile, "wb" ), -1 ) 281 p = pickle.Pickler(file(self.cachefile, "wb" ), -1 )
275 p.dump([self.depends_cache, version_data]) 282 p.dump([cache_data, version_data])
276 283
277 def mtime(self, cachefile): 284 def mtime(self, cachefile):
278 return bb.parse.cached_mtime_noerror(cachefile) 285 return bb.parse.cached_mtime_noerror(cachefile)
@@ -373,6 +380,8 @@ class Cache:
373 if not self.getVar('BROKEN', file_name, True) and not self.getVar('EXCLUDE_FROM_WORLD', file_name, True): 380 if not self.getVar('BROKEN', file_name, True) and not self.getVar('EXCLUDE_FROM_WORLD', file_name, True):
374 cacheData.possible_world.append(file_name) 381 cacheData.possible_world.append(file_name)
375 382
383 # Touch this to make sure its in the cache
384 self.getVar('__BB_DONT_CACHE', file_name, True)
376 385
377 def load_bbfile( self, bbfile , config): 386 def load_bbfile( self, bbfile , config):
378 """ 387 """
diff --git a/bitbake/lib/bb/fetch/__init__.py b/bitbake/lib/bb/fetch/__init__.py
index 721eb4d646..9300d0c234 100644
--- a/bitbake/lib/bb/fetch/__init__.py
+++ b/bitbake/lib/bb/fetch/__init__.py
@@ -232,6 +232,8 @@ def get_srcrev(d):
232 bb.msg.error(bb.msg.domain.Fetcher, "SRCREV was used yet no valid SCM was found in SRC_URI") 232 bb.msg.error(bb.msg.domain.Fetcher, "SRCREV was used yet no valid SCM was found in SRC_URI")
233 raise ParameterError 233 raise ParameterError
234 234
235 bb.data.setVar('__BB_DONT_CACHE','1', d)
236
235 if len(scms) == 1: 237 if len(scms) == 1:
236 return urldata[scms[0]].method.sortable_revision(scms[0], urldata[scms[0]], d) 238 return urldata[scms[0]].method.sortable_revision(scms[0], urldata[scms[0]], d)
237 239