summaryrefslogtreecommitdiffstats
path: root/lib/bb/persist_data.py
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 /lib/bb/persist_data.py
parent9bfc553546313cf2322a9e3824fec388b20e80d5 (diff)
downloadbitbake-contrib-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
Diffstat (limited to 'lib/bb/persist_data.py')
-rw-r--r--lib/bb/persist_data.py4
1 files changed, 2 insertions, 2 deletions
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: