Skip to content

Commit

Permalink
Don't set MALLOC_PERTURB_ when calling grub2-install. (workaround #80…
Browse files Browse the repository at this point in the history
…6784)

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.
  • Loading branch information
vathpela committed Mar 28, 2012
1 parent f2abac2 commit 022b8b6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 2 additions & 1 deletion pyanaconda/bootloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -1789,7 +1789,8 @@ def install(self):

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")

Expand Down
6 changes: 5 additions & 1 deletion pyanaconda/iutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def stop(self):
# @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)

Expand Down Expand Up @@ -129,6 +129,10 @@ def chroot ():
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)
Expand Down

0 comments on commit 022b8b6

Please sign in to comment.