Index: buildbot/cbuildbot_stages.py |
diff --git a/buildbot/cbuildbot_stages.py b/buildbot/cbuildbot_stages.py |
index e5f2381936480aadb8ff349c56cd0aca8d45ecf6..b1ed27930e31a9dd5b7b419353040926fa970157 100644 |
--- a/buildbot/cbuildbot_stages.py |
+++ b/buildbot/cbuildbot_stages.py |
@@ -389,10 +389,14 @@ class BuildTargetStage(BuilderStage): |
BuilderStage.new_binhost = self._GetPortageEnvVar(_FULL_BINHOST) |
emptytree = (BuilderStage.old_binhost and |
BuilderStage.old_binhost != BuilderStage.new_binhost) |
+ env=None |
+ if self._build_config.get('useflags'): |
+ env={'USE' : ' '.join(self._build_config['useflags'])} |
commands.Build( |
self._build_root, emptytree, usepkg=self._build_config['usepkg'], |
- build_autotest=(self._build_config['vm_tests'] and self._options.tests)) |
+ build_autotest=(self._build_config['vm_tests'] and self._options.tests), |
+ extra_env=env) |
# TODO(sosa): Do this optimization in a better way. |
if self._build_type == 'full': |
@@ -401,10 +405,10 @@ class BuildTargetStage(BuilderStage): |
self._build_config['rev_overlays'], [], self._build_type, |
False) |
- commands.BuildImage(self._build_root) |
+ commands.BuildImage(self._build_root, extra_env=env) |
if self._build_config['vm_tests']: |
- commands.BuildVMImageForTesting(self._build_root) |
+ commands.BuildVMImageForTesting(self._build_root, extra_env=env) |
class TestStage(BuilderStage): |