Index: bin/cbuildbot.py |
diff --git a/bin/cbuildbot.py b/bin/cbuildbot.py |
index 2e86ae417356afa7548e70b67a92dadb01299759..b424a2f0ee5e9e6ed660c28fb8ffd6fee05f4ebc 100755 |
--- a/bin/cbuildbot.py |
+++ b/bin/cbuildbot.py |
@@ -341,10 +341,13 @@ def _SetupBoard(buildroot, board='x86-generic'): |
cwd=cwd, enter_chroot=True) |
-def _Build(buildroot): |
+def _Build(buildroot, emptytree): |
"""Wrapper around build_packages.""" |
cwd = os.path.join(buildroot, 'src', 'scripts') |
- RunCommand(['./build_packages'], cwd=cwd, enter_chroot=True) |
+ cmd = ['./build_packages'] |
+ if emptytree: |
+ cmd.insert(0, 'EXTRA_BOARD_FLAGS=--emptytree') |
sosa
2010/12/09 18:37:47
extra line
|
+ RunCommand(cmd, cwd=cwd, enter_chroot=True) |
def _BuildChrome(buildroot, board, chrome_atom_to_build): |
@@ -646,8 +649,7 @@ def main(): |
_IncrementalCheckout(buildroot) |
new_binhost = _GetPortageEnvVar(buildroot, board, _FULL_BINHOST) |
- if old_binhost and old_binhost != new_binhost: |
- RunCommand(['sudo', 'rm', '-rf', boardpath]) |
+ emptytree = (old_binhost and old_binhost != new_binhost) |
# Check that all overlays can be found. |
for path in rev_overlays: |
@@ -671,7 +673,7 @@ def main(): |
_EnableLocalAccount(buildroot) |
# Doesn't rebuild without acquiring more source. |
if options.sync: |
- _Build(buildroot) |
+ _Build(buildroot, emptytree) |
if chrome_atom_to_build: |
_BuildChrome(buildroot, buildconfig['board'], chrome_atom_to_build) |