Bug#636083: gconf2: gconf-schemas python script drops all environment variables for spawnvpe call

Johannes Schauer j.schauer at email.de
Sat Jul 30 21:21:32 UTC 2011


Package: gconf2
Version: 2.32.4-1
Severity: normal
Tags: patch

Hi,

when using /usr/sbin/gconf-schemas with a modified LD_PRELOAD (to to use
libfakechroot.so and libfakeroot-sysv.so) and a modified LD_LIBRARY_PATH
(to use foreign armel shared libraries on my x86_64 system) I observed
that this python script drops all environment variables and calls
gconftool-2 with only HOME and GCONF_CONFIG_SOURCE being set.

This is easily fixable by updating the existing environment with the two
new variables instead of throwing it away completely:

@@ -58,8 +58,9 @@
 
 if schemas:
     tmp_home=tempfile.mkdtemp(prefix='gconf-')
-    env={'HOME': tmp_home,
-         'GCONF_CONFIG_SOURCE': 'xml:readwrite:'+defaults_dest}
+    env=os.environ.copy()
+    env['HOME'] = tmp_home
+    env['GCONF_CONFIG_SOURCE'] = 'xml:readwrite:'+defaults_dest
     if options.register:
       arg='--makefile-install-rule'
     else:

if it is (for some reason) not desirable to use all environment
variables (why?) one could also just copy LD_PRELOAD and LD_LIBRARY_PATH
over. But those two should definitely be used in the later spawnvpe
call. Without those two, this package can not be installed when using
qemu user mode emulation inside a fakeroot/fakechroot.

cheers, josch






More information about the pkg-gnome-maintainers mailing list