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:
parent
73717a5288
commit
bcdd43997b
@ -121,6 +121,10 @@ class Lorax(BaseLoraxClass):
|
||||
# so we have to add it ourselves
|
||||
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
|
||||
|
||||
def init_stream_logging(self):
|
||||
|
Loading…
Reference in New Issue
Block a user