[jhbuild] config: automatically expand path keys (GNOME bug 634985)



commit 167ea53233d1ae7ddca69be458cd194ddd75936b
Author: FrÃdÃric PÃters <fpeters 0d be>
Date:   Sat Oct 8 15:23:37 2011 -0400

    config: automatically expand path keys (GNOME bug 634985)

 jhbuild/config.py |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/jhbuild/config.py b/jhbuild/config.py
index be952e6..d7db09c 100644
--- a/jhbuild/config.py
+++ b/jhbuild/config.py
@@ -261,6 +261,14 @@ class Config:
         if config.get('installprog') and os.path.exists(config['installprog']):
             os.environ['INSTALL'] = config['installprog']
 
+        for path_key in ('checkoutroot', 'buildroot', 'top_builddir',
+                         'tinderbox_outputdir', 'tarballdir', 'copy_dir',
+                         'jhbuildbot_slaves_dir', 'jhbuildbot_dir',
+                         'jhbuildbot_mastercfg', 'modulesets_dir',
+                         'dvcs_mirror_dir', 'static_analyzer_outputdir'):
+            if config.get(path_key):
+                config[path_key] = os.path.expanduser(config[path_key])
+
         # copy known config keys to attributes on the instance
         for name in _known_keys:
             setattr(self, name, config[name])



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]