summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2008-05-11 13:45:48 +0000
committerHolger Hans Peter Freyther <zecke@selfish.org>2008-05-11 13:45:48 +0000
commit35c3263578d2120d534444fa5e81d845ad9208cb (patch)
tree3b59c5dd3914e0df67618264ecb2234c1d7a3745
parent9bfc553546313cf2322a9e3824fec388b20e80d5 (diff)
downloadbitbake-35c3263578d2120d534444fa5e81d845ad9208cb.tar.gz
Allow to store the PersistData in a PERSISTENT_DIR.
If PERSISTENT_DIR is used wiping the tmpdir will not wipe the PersistData which sometines is wanted (e.g. for git SRCREVs). Acked-By: Richard
-rw-r--r--ChangeLog2
-rw-r--r--lib/bb/persist_data.py4
2 files changed, 4 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index eb701d570..1f89f90fd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -134,6 +134,8 @@ Changes in Bitbake 1.9.x:
- Flush stdout/stderr before forking to fix duplicate console output
- Make sure recrdeps tasks include all inter-task dependencies of a given fn
- Add bb.runqueue.check_stamp_fn() for use by packaged-staging
+ - Add PERSISTENT_DIR to store the PersistData in a persistent
+ directory != the cache dir.
Changes in Bitbake 1.8.0:
- Release 1.7.x as a stable series
diff --git a/lib/bb/persist_data.py b/lib/bb/persist_data.py
index 3103805ce..79e7448be 100644
--- a/lib/bb/persist_data.py
+++ b/lib/bb/persist_data.py
@@ -43,9 +43,9 @@ class PersistData:
Why sqlite? It handles all the locking issues for us.
"""
def __init__(self, d):
- self.cachedir = bb.data.getVar("CACHE", d, True)
+ self.cachedir = bb.data.getVar("PERSISTENT_DIR", d, True) or bb.data.getVar("CACHE", d, True)
if self.cachedir in [None, '']:
- bb.msg.fatal(bb.msg.domain.PersistData, "Please set the 'CACHE' variable.")
+ bb.msg.fatal(bb.msg.domain.PersistData, "Please set the 'PERSISTENT_DIR' or 'CACHE' variable.")
try:
os.stat(self.cachedir)
except OSError: