[jhbuild] Revert "Use XDG_CONFIG_DIR"



commit 14af4992d171bcc94e292d226731d0e0405c7ef0
Author: William Jon McCann <jmccann redhat com>
Date:   Sat Apr 2 21:58:17 2011 -0400

    Revert "Use XDG_CONFIG_DIR"
    
    This reverts commit b5685fc12a5faf1bf5124a6b63104284efda4edb.

 jhbuild/config.py |    9 +--------
 jhbuild/main.py   |    8 +-------
 2 files changed, 2 insertions(+), 15 deletions(-)
---
diff --git a/jhbuild/config.py b/jhbuild/config.py
index 1864fb1..4e093c4 100644
--- a/jhbuild/config.py
+++ b/jhbuild/config.py
@@ -37,12 +37,7 @@ if sys.platform.startswith('win'):
 __all__ = [ 'Config' ]
 
 _defaults_file = os.path.join(os.path.dirname(__file__), 'defaults.jhbuildrc')
-if os.environ.has_key('XDG_CONFIG_HOME'):
-    _default_jhbuildrc = os.path.join(os.environ['XDG_CONFIG_HOME'], '.jhbuildrc')
-else:
-    _default_jhbuildrc = os.path.join(os.environ['HOME'], '.config', 'jhbuildrc')
-
-_old_default_jhbuildrc = os.path.join(os.environ['HOME'], '.jhbuildrc')
+_default_jhbuildrc = os.path.join(os.environ['HOME'], '.jhbuildrc')
 
 _known_keys = [ 'moduleset', 'modules', 'skip', 'tags', 'prefix',
                 'checkoutroot', 'buildroot', 'autogenargs', 'makeargs',
@@ -193,8 +188,6 @@ class Config:
         self._config['__file__'] = filename
         self.filename = filename
         if not os.path.exists(filename):
-            if os.path.exists(_old_default_jhbuildrc):
-                logging.warning(_('You may wish to move %s to %s'), _old_default_jhbuildrc, filename)
             raise FatalError(_('could not load config file, %s is missing') % filename)
 
         self.load()
diff --git a/jhbuild/main.py b/jhbuild/main.py
index 5e93f76..1ecc9c1 100644
--- a/jhbuild/main.py
+++ b/jhbuild/main.py
@@ -107,12 +107,6 @@ def main(args):
         add_help_option=False,
         description=_('Build a set of modules from diverse repositories in correct dependency order (such as GNOME).'))
     parser.disable_interspersed_args()
-
-    if os.environ.has_key('XDG_CONFIG_HOME'):
-        _default_jhbuildrc = os.path.join(os.environ['XDG_CONFIG_HOME'], '.jhbuildrc')
-    else:
-        _default_jhbuildrc = os.path.join(os.environ['HOME'], '.config', 'jhbuildrc')
-
     parser.add_option('-h', '--help', action='callback',
                       callback=lambda *args: print_help(parser),
                       help=_("Display this help and exit"))
@@ -121,7 +115,7 @@ def main(args):
                       help=optparse.SUPPRESS_HELP)
     parser.add_option('-f', '--file', action='store', metavar='CONFIG',
                       type='string', dest='configfile',
-                      default=os.environ.get("JHBUILDRC", _default_jhbuildrc),
+                      default=os.environ.get("JHBUILDRC", os.path.join(os.environ['HOME'], '.jhbuildrc')),
                       help=_('use a non default configuration file'))
     parser.add_option('-m', '--moduleset', action='store', metavar='URI',
                       type='string', dest='moduleset', default=None,



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