Set LD_LIBRARY_PATH before running dconf

When we are manually starting dconf in the case where it can't
be activated via D-Bus, we need to set LD_LIBRARY_PATH in its
environment, since dconf is no longer linked with a rpath.
(Unlike the rest of GNOME, it doesn't use libtool.)
This commit is contained in:
Owen W. Taylor 2010-07-28 15:26:15 -04:00 committed by Colin Walters
parent 43de15c3fc
commit 911e71542b

View File

@ -149,9 +149,18 @@ def start_dconf_await_service():
print "Starting dconf-service... ",
sys.stdout.flush()
# dconf is linked without libtool, so unlike other GNOME modules,
# won't have an embedded rpath for its library directory.
env = dict(os.environ)
if 'LD_LIBRARY_PATH' in env:
ld_library_path = '@libdir@:' + env['LD_LIBRARY_PATH']
else:
ld_library_path = '@libdir@'
env['LD_LIBRARY_PATH'] = ld_library_path
dconf_path = os.path.join('@libexecdir@', 'dconf-service')
try:
subprocess.Popen([dconf_path, '--keep-alive'])
subprocess.Popen([dconf_path, '--keep-alive'], env=env)
except OSError, e:
print "\nFailed to start %s: %s" % (dconf_path, e)
sys.exit(1)