[gnome-tweak-tool] --prefix parameter should override built defs
- From: John Stowers <jstowers src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-tweak-tool] --prefix parameter should override built defs
- Date: Tue, 29 Mar 2011 22:15:03 +0000 (UTC)
commit 11916a7746d2adc97c7b4b0bc87f3bfb07907c09
Author: John Stowers <john stowers gmail com>
Date: Wed Mar 30 11:05:52 2011 +1300
--prefix parameter should override built defs
gnome-tweak-tool | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/gnome-tweak-tool b/gnome-tweak-tool
index be3a3d9..70eac1a 100755
--- a/gnome-tweak-tool
+++ b/gnome-tweak-tool
@@ -55,7 +55,13 @@ if __name__ == '__main__':
try:
from gtweak.defs import GSETTINGS_SCHEMA_DIR, TWEAK_DIR, DATA_DIR, PKG_DATA_DIR
+ _defs_present = True
except ImportError:
+ GSETTINGS_SCHEMA_DIR = TWEAK_DIR = DATA_DIR = PKG_DATA_DIR = ""
+ _defs_present = False
+
+ #the supplied prefix always beats the contents of defs
+ if options.prefix or not _defs_present:
_prefix = options.prefix or "/usr"
DATA_DIR = os.path.join(_prefix, "share")
GSETTINGS_SCHEMA_DIR = os.path.join(_prefix, "share", "glib-2.0", "schemas")
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]