[gobject-introspection] Add GI_SCANNER_DISABLE_CACHE environment variable
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gobject-introspection] Add GI_SCANNER_DISABLE_CACHE environment variable
- Date: Wed, 4 May 2011 18:56:59 +0000 (UTC)
commit 2330248ea37ad1251da58700ffb1ea0d578523ee
Author: Colin Walters <walters verbum org>
Date: Mon May 2 12:25:10 2011 -0400
Add GI_SCANNER_DISABLE_CACHE environment variable
https://bugzilla.gnome.org/show_bug.cgi?id=649054
docs/g-ir-scanner.1 | 3 +++
giscanner/cachestore.py | 2 ++
2 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/docs/g-ir-scanner.1 b/docs/g-ir-scanner.1
index 7108dda..847c78b 100644
--- a/docs/g-ir-scanner.1
+++ b/docs/g-ir-scanner.1
@@ -133,6 +133,9 @@ Be verbose, include some debugging information.
The g-ir-scanner uses the XDG_DATA_DIRS variable to check for dirs,
the gir's are located in XDG_DATA_DIRS/share/gir-1.0. It is normally
set on a distribution so you shouldn't need to set it yourself.
+
+The variable GI_SCANNER_DISABLE_CACHE ensures that the scanner will
+not write cache data to $HOME.
.SH BUGS
Report bugs at http://bugzilla.gnome.org/ in the glib product and
introspection component.
diff --git a/giscanner/cachestore.py b/giscanner/cachestore.py
index 7b72b29..44e3b04 100644
--- a/giscanner/cachestore.py
+++ b/giscanner/cachestore.py
@@ -41,6 +41,8 @@ def _get_versionhash():
return hashlib.sha1(''.join(mtimes)).hexdigest()
def _get_cachedir():
+ if 'GI_SCANNER_DISABLE_CACHE' in os.environ:
+ return None
homedir = os.environ.get('HOME')
if homedir is None:
return None
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]