Remove some env variables (#907692)

Some package scripts may call utilities using dbus. Since this is just a
chroot that will fail. This unsets DESKTOP and DBUS_SESSION_BUS_ADDRESS
to keep them from crashing.
This commit is contained in:
Brian C. Lane 2013-02-14 16:16:54 -08:00
parent 73717a5288
commit bcdd43997b

View File

@ -121,6 +121,10 @@ class Lorax(BaseLoraxClass):
# so we have to add it ourselves # so we have to add it ourselves
os.environ["PATH"] = "{0}:/sbin:/usr/sbin".format(os.environ["PATH"]) os.environ["PATH"] = "{0}:/sbin:/usr/sbin".format(os.environ["PATH"])
# remove some environmental variables that can cause problems with package scripts
env_remove = ('DISPLAY', 'DBUS_SESSION_BUS_ADDRESS')
[os.environ.pop(k) for k in env_remove if k in os.environ]
self._configured = True self._configured = True
def init_stream_logging(self): def init_stream_logging(self):