[jhbuild] config: fix XDG basedir compliance



commit ee3d23c64ee83e0b7b87ae7cd5495e1c5451eb27
Author: Ryan Lortie <desrt desrt ca>
Date:   Wed Jan 1 16:33:30 2014 -0500

    config: fix XDG basedir compliance
    
    quoth the spec:
    
    If $XDG_DATA_DIRS is either not set or empty, a value equal to
    /usr/local/share/:/usr/share/ should be used.
    
    If $XDG_CONFIG_DIRS is either not set or empty, a value equal to
    /etc/xdg should be used.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=720118

 jhbuild/config.py |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/jhbuild/config.py b/jhbuild/config.py
index c4f5cf1..4b8824c 100644
--- a/jhbuild/config.py
+++ b/jhbuild/config.py
@@ -436,14 +436,14 @@ class Config:
         addpath('GI_TYPELIB_PATH', typelibpath)
 
         # XDG_DATA_DIRS
-        if self.partial_build:
-            addpath('XDG_DATA_DIRS', '/usr/share')
+        if not 'XDG_DATA_DIRS' in os.environ:
+            os.environ['XDG_DATA_DIRS'] = '/usr/local/share:/usr/share'
         xdgdatadir = os.path.join(self.prefix, 'share')
         addpath('XDG_DATA_DIRS', xdgdatadir)
 
         # XDG_CONFIG_DIRS
-        if self.partial_build:
-            addpath('XDG_CONFIG_DIRS', '/etc')
+        if not 'XDG_CONFIG_DIRS' in os.environ:
+            XDG_CONFIG_DIRS='/etc/xdg'
         xdgconfigdir = os.path.join(self.prefix, 'etc', 'xdg')
         addpath('XDG_CONFIG_DIRS', xdgconfigdir)
 


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