mirror of
https://github.com/flatcar/scripts.git
synced 2025-11-28 14:01:43 +01:00
Update parallel_emerge to use no-env-update feature which skips env_update.
Currently, our build occasionally fails with errors about about symlinks already existing. This usually only slows down the build, because we have retries, but it would be good to fix the problem. This patch updates parallel_emerge to use the no-env-update feature for cross- compiles. This feature skips the env_update step, which isn't thread-safe, and isn't necessary for when we're cross-compiling and don't actually need to run the binaries. Instead we run the env_update at the end, avoiding a thread-safety issue. TEST=Ran full build --nousepkg with env_update occuring at end. BUG=chromium-os:5382 Review URL: http://codereview.chromium.org/3034051
This commit is contained in:
parent
56e08b2424
commit
77e8092a9c
@ -327,6 +327,13 @@ class DepGraphGenerator(object):
|
||||
# lying around and they cause problems, so for now we disable the flag.
|
||||
# TODO(davidjames): Look for a better solution.
|
||||
features = os.environ.get("FEATURES", "") + " -collision-protect"
|
||||
|
||||
# If we're cross-compiling, updating the environment every time we install
|
||||
# a package isn't necessary, and leads to race conditions. Do environment
|
||||
# updates at the end, instead.
|
||||
if self.board:
|
||||
features = features + " no-env-update"
|
||||
|
||||
os.environ["FEATURES"] = features
|
||||
|
||||
# Now that we've setup the necessary environment variables, we can load the
|
||||
@ -1315,6 +1322,10 @@ def main():
|
||||
if new_world_pkgs:
|
||||
world_set.update(new_world_pkgs)
|
||||
|
||||
# Update environment (library cache, symlinks, etc.)
|
||||
if deps.board and "--pretend" not in emerge.opts:
|
||||
portage.env_update()
|
||||
|
||||
print "Done"
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user