Fixed build failure w/ new sudo

Change-Id: I2760e33e1473ce04f7adeda39d0db5725eaa81ae

BUG=chromium-os:7072
TEST=Replaced ./build_packages with bash and ran command; valided env var set right.

Review URL: http://codereview.chromium.org/5930002
This commit is contained in:
Doug Anderson 2010-12-15 16:51:49 -08:00
parent 7361be58e0
commit 9b0127c6f5

View File

@ -413,9 +413,10 @@ def _SetupBoard(buildroot, board='x86-generic'):
def _Build(buildroot, emptytree):
"""Wrapper around build_packages."""
cwd = os.path.join(buildroot, 'src', 'scripts')
cmd = ['./build_packages']
if emptytree:
cmd.insert(0, 'EXTRA_BOARD_FLAGS=--emptytree')
cmd = ['sh', '-c', 'EXTRA_BOARD_FLAGS=--emptytree ./build_packages']
else:
cmd = ['./build_packages']
RunCommand(cmd, cwd=cwd, enter_chroot=True)