#7523 library regeneration fails as XDG_DATA_DIRS is unset
The XDG specs say that a default value should be used if it is not set
This commit is contained in:
parent
d17347cc19
commit
cc8e682ab0
@ -168,11 +168,12 @@ class ContentBundle(Bundle):
|
|||||||
return self._bundle_class
|
return self._bundle_class
|
||||||
|
|
||||||
def _run_indexer(self):
|
def _run_indexer(self):
|
||||||
if os.environ.has_key('XDG_DATA_DIRS'):
|
xdg_data_dirs = os.getenv('XDG_DATA_DIRS',
|
||||||
for path in os.environ['XDG_DATA_DIRS'].split(':'):
|
'/usr/local/share/:/usr/share/')
|
||||||
indexer = os.path.join(path, 'library-common', 'make_index.py')
|
for path in xdg_data_dirs.split(':'):
|
||||||
if os.path.exists(indexer):
|
indexer = os.path.join(path, 'library-common', 'make_index.py')
|
||||||
os.spawnlp(os.P_WAIT, 'python', 'python', indexer)
|
if os.path.exists(indexer):
|
||||||
|
os.spawnlp(os.P_WAIT, 'python', 'python', indexer)
|
||||||
|
|
||||||
def is_installed(self):
|
def is_installed(self):
|
||||||
if self._unpacked:
|
if self._unpacked:
|
||||||
|
Loading…
Reference in New Issue
Block a user