diff options
author | Peter Jones <pjones@redhat.com> | 2012-03-28 16:51:26 -0400 |
---|---|---|
committer | Peter Jones <pjones@redhat.com> | 2012-03-28 16:51:26 -0400 |
commit | 022b8b6b6ccc42519c3ea5aea68594c5354be2c0 (patch) | |
tree | 68f0eeac41809484deb982cddf81643130607c53 /pyanaconda | |
parent | f2abac2bd21453fab561c924d5eae785e491b97d (diff) | |
download | anaconda-022b8b6b6ccc42519c3ea5aea68594c5354be2c0.tar.gz anaconda-022b8b6b6ccc42519c3ea5aea68594c5354be2c0.tar.xz anaconda-022b8b6b6ccc42519c3ea5aea68594c5354be2c0.zip |
Don't set MALLOC_PERTURB_ when calling grub2-install. (workaround #806784)
With MALLOC_PERTURB_ set, we get:
[anaconda root@testraid ~]# export MALLOC_PERTURB_=204
[anaconda root@testraid ~]# grub2-install --no-floppy /dev/mapper/nvidia_dejcgici
/sbin/grub2-bios-setup: error: disk `hostdisk//dev/mapper/�����������������������������������������������������������������������������������������' not found.
This is obviously bad, so we're going to work around it by not setting
that for now.
Diffstat (limited to 'pyanaconda')
-rw-r--r-- | pyanaconda/bootloader.py | 3 | ||||
-rw-r--r-- | pyanaconda/iutil.py | 6 |
2 files changed, 7 insertions, 2 deletions
diff --git a/pyanaconda/bootloader.py b/pyanaconda/bootloader.py index 805bd1e07..ffa9632eb 100644 --- a/pyanaconda/bootloader.py +++ b/pyanaconda/bootloader.py @@ -1789,7 +1789,8 @@ class GRUB2(GRUB): rc = iutil.execWithRedirect("grub2-install", args, stdout="/dev/tty5", stderr="/dev/tty5", - root=ROOT_PATH) + root=ROOT_PATH, + env_prune=['MALLOC_PERTURB_']) if rc: raise BootLoaderError("bootloader install failed") diff --git a/pyanaconda/iutil.py b/pyanaconda/iutil.py index 4ab3354c0..e3b6c846f 100644 --- a/pyanaconda/iutil.py +++ b/pyanaconda/iutil.py @@ -83,7 +83,7 @@ class tee(threading.Thread): # @param root The directory to chroot to before running command. # @return The return code of command. def execWithRedirect(command, argv, stdin = None, stdout = None, - stderr = None, root = '/'): + stderr = None, root = '/', env_prune=[]): def chroot (): os.chroot(root) @@ -129,6 +129,10 @@ def execWithRedirect(command, argv, stdin = None, stdout = None, env = os.environ.copy() env.update({"LC_ALL": "C"}) + for var in env_prune: + if env.has_key(var): + del env[var] + try: #prepare tee proceses proc_std = tee(pstdout, stdout, program_log.info, command) |